pub type NonNegativeLengthPercentage = NonNegative<LengthPercentage>;
Expand description

A wrapper of LengthPercentage, whose value must be >= 0.

Aliased Type§

struct NonNegativeLengthPercentage(pub LengthPercentage);

Fields§

§0: LengthPercentage

Implementations§

source§

impl NonNegativeLengthPercentage

source

pub fn is_definitely_zero(&self) -> bool

Returns true if the computed value is absolute 0 or 0%.

source

pub fn to_used_value(&self, containing_length: Au) -> Au

Returns the used value.

source

pub fn maybe_to_used_value(&self, containing_length: Option<Au>) -> Option<Au>

Convert the computed value into used value.

Trait Implementations§

source§

impl ToAnimatedValue for NonNegativeLengthPercentage

§

type AnimatedValue = LengthPercentage

The type of the animated value.
source§

fn to_animated_value(self) -> Self::AnimatedValue

Converts this value to an animated value.
source§

fn from_animated_value(animated: Self::AnimatedValue) -> Self

Converts back an animated value into a computed value.