Struct svgdom::Length[][src]

pub struct Length {
    pub num: f64,
    pub unit: LengthUnit,
}

Representation of the <length> type.

Fields

Methods

impl Length
[src]

Constructs a new length.

Constructs a new length with LengthUnit::None.

Constructs a new length with a zero number.

Shorthand for: Length::new(0.0, Unit::None).

Trait Implementations

impl WriteBuffer for Length
[src]

Writes data to the Vec<u8> buffer using specified WriteOptions.

Writes data to the Vec<u8> buffer using default WriteOptions.

Returns an object that implements fmt::Display using provided write options.

impl FuzzyEq<Length> for Length
[src]

Returns true if values are approximately equal.

Returns true if values are not approximately equal.

impl FromSpan for Length
[src]

Parses data from a StrSpan.

impl Clone for Length
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for Length
[src]

Formats the value using the given formatter. Read more

impl FromStr for Length
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

impl Debug for Length
[src]

Formats the value using the given formatter. Read more

impl Copy for Length
[src]

impl PartialEq<Length> for Length
[src]

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

This method tests for !=.

impl From<Length> for AttributeValue
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Length

impl Sync for Length