Type Alias style::values::specified::NonNegativeNumberOrPercentage
source · pub type NonNegativeNumberOrPercentage = NonNegative<NumberOrPercentage>;
Expand description
A non-negative
Aliased Type§
struct NonNegativeNumberOrPercentage(pub NumberOrPercentage);
Fields§
§0: NumberOrPercentage
Implementations§
source§impl NonNegativeNumberOrPercentage
impl NonNegativeNumberOrPercentage
sourcepub fn hundred_percent() -> Self
pub fn hundred_percent() -> Self
Returns the 100%
value.
sourcepub fn new_number(n: f32) -> Self
pub fn new_number(n: f32) -> Self
Return a particular number.
Trait Implementations§
source§impl Parse for NonNegativeNumberOrPercentage
impl Parse for NonNegativeNumberOrPercentage
source§fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more