style::values::specified

Type Alias NonNegativeNumber

Source
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