Type Alias style::values::specified::percentage::NonNegativePercentage
source · pub type NonNegativePercentage = NonNegative<Percentage>;
Expand description
A wrapper of Percentage, whose value must be >= 0.
Aliased Type§
struct NonNegativePercentage(pub Percentage);
Fields§
§0: Percentage
Implementations§
source§impl NonNegativePercentage
impl NonNegativePercentage
sourcepub fn compute(&self) -> ComputedPercentage
pub fn compute(&self) -> ComputedPercentage
Convert to ComputedPercentage, for FontFaceRule size-adjust getter.
Trait Implementations§
source§impl Parse for NonNegativePercentage
impl Parse for NonNegativePercentage
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