Struct cssparser::NumericValue [] [src]

pub struct NumericValue {
    pub value: f32,
    pub int_value: Option<i32>,
    pub has_sign: bool,
}

The numeric value of Number and Dimension tokens.

Fields

value: f32

The value as a float

int_value: Option<i32>

If the origin source did not include a fractional part, the value as an integer.

has_sign: bool

Whether the number had a + or - sign.

This is used is some cases like the micro syntax. (See the parse_nth function.)

Trait Implementations

impl Clone for NumericValue
[src]

fn clone(&self) -> NumericValue

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for NumericValue
[src]

impl Debug for NumericValue
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl PartialEq for NumericValue
[src]

fn eq(&self, __arg_0: &NumericValue) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &NumericValue) -> bool

This method tests for !=.