Skip to main content

NonNegativeNumberOrPercentage

Type Alias NonNegativeNumberOrPercentage 

Source
pub type NonNegativeNumberOrPercentage = NonNegative<NumberOrPercentage>;
Expand description

A non-negative | .

Aliased Type§

#[repr(transparent)]
pub struct NonNegativeNumberOrPercentage(pub NumberOrPercentage);

Tuple Fields§

§0: NumberOrPercentage

Implementations§

Source§

impl NonNegativeNumberOrPercentage

Source

pub fn hundred_percent() -> Self

Returns the 100% value.

Source

pub fn new_number(n: f32) -> Self

Return a particular number.

Trait Implementations§

Source§

impl Parse for NonNegativeNumberOrPercentage

Source§

fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>

Parse a value of this type. Read more