pub type NonNegativeLength = NonNegative<Length>;Expand description
A wrapper of Length, whose value must be >= 0.
Aliased Type§
#[repr(transparent)]pub struct NonNegativeLength(pub Length);Tuple Fields§
§0: LengthImplementations§
Source§impl NonNegativeLength
impl NonNegativeLength
Sourcepub fn parse_quirky(
context: &ParserContext<'_>,
input: &mut Parser<'_>,
allow_quirks: AllowQuirks,
) -> Result<Self, ParseError>
pub fn parse_quirky( context: &ParserContext<'_>, input: &mut Parser<'_>, allow_quirks: AllowQuirks, ) -> Result<Self, ParseError>
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(
context: &ParserContext<'_>,
input: &mut Parser<'_>,
) -> Result<Self, ParseError>
fn parse( context: &ParserContext<'_>, input: &mut Parser<'_>, ) -> Result<Self, ParseError>
Parse a value of this type. Read more