pub type NonNegativeNumber = NonNegative<Number>;
Expand description

A Number which is >= 0.0.

Aliased Type§

struct NonNegativeNumber(pub Number);

Fields§

§0: Number

Implementations§

source§

impl NonNegativeNumber

source

pub fn new(val: CSSFloat) -> Self

Returns a new non-negative number with the value val.

source

pub fn get(&self) -> f32

Returns the numeric value.

Trait Implementations§

source§

impl One for NonNegativeNumber

source§

fn one() -> Self

Reutrns the one value.
source§

fn is_one(&self) -> bool

Returns whether this value is one.
source§

impl Parse for NonNegativeNumber

source§

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

Parse a value of this type. Read more