pub type NonNegativeLength = NonNegative<Length>;
Expand description
A wrapper of Length, whose value must be >= 0.
Aliased Type§
struct NonNegativeLength(pub Length);
Fields§
§0: Length
Implementations§
source§impl NonNegativeLength
impl NonNegativeLength
sourcepub fn parse_quirky<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
allow_quirks: AllowQuirks,
) -> Result<Self, ParseError<'i>>
pub fn parse_quirky<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, allow_quirks: AllowQuirks, ) -> Result<Self, ParseError<'i>>
Parses a non-negative length, optionally with quirks.
Trait Implementations§
source§impl From<Length> for NonNegativeLength
impl From<Length> for NonNegativeLength
source§impl From<NoCalcLength> for NonNegativeLength
impl From<NoCalcLength> for NonNegativeLength
source§fn from(len: NoCalcLength) -> Self
fn from(len: NoCalcLength) -> Self
Converts to this type from the input type.
source§impl Parse for NonNegativeLength
impl Parse for NonNegativeLength
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