Type Alias style::values::computed::length_percentage::NonNegativeLengthPercentage
source · 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
impl NonNegativeLengthPercentage
sourcepub fn is_definitely_zero(&self) -> bool
pub fn is_definitely_zero(&self) -> bool
Returns true if the computed value is absolute 0 or 0%.
sourcepub fn to_used_value(&self, containing_length: Au) -> Au
pub fn to_used_value(&self, containing_length: Au) -> Au
Returns the used value.
Trait Implementations§
source§impl ToAnimatedValue for NonNegativeLengthPercentage
impl ToAnimatedValue for NonNegativeLengthPercentage
§type AnimatedValue = LengthPercentage
type AnimatedValue = LengthPercentage
The type of the animated value.
source§fn to_animated_value(self, context: &AnimatedContext<'_>) -> Self::AnimatedValue
fn to_animated_value(self, context: &AnimatedContext<'_>) -> Self::AnimatedValue
Converts this value to an animated value.
source§fn from_animated_value(animated: Self::AnimatedValue) -> Self
fn from_animated_value(animated: Self::AnimatedValue) -> Self
Converts back an animated value into a computed value.