Type Alias style::values::computed::NonNegativeNumber
source · pub type NonNegativeNumber = NonNegative<CSSFloat>;
Expand description
A wrapper of Number, but the value >= 0.
Aliased Type§
struct NonNegativeNumber(pub f32);
Fields§
§0: f32
Trait Implementations§
source§impl From<f32> for NonNegativeNumber
impl From<f32> for NonNegativeNumber
source§fn from(number: CSSFloat) -> NonNegativeNumber
fn from(number: CSSFloat) -> NonNegativeNumber
Converts to this type from the input type.
source§impl One for NonNegativeNumber
impl One for NonNegativeNumber
source§impl ToAnimatedValue for NonNegativeNumber
impl ToAnimatedValue for NonNegativeNumber
source§type AnimatedValue = f32
type AnimatedValue = f32
The type of the animated value.
source§fn to_animated_value(self, _: &Context<'_>) -> Self::AnimatedValue
fn to_animated_value(self, _: &Context<'_>) -> 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.