Struct svgdom::Length [] [src]

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

Representation of the <length> type.

We use own struct and not one from svgparser, because of traits.

Fields

Methods

impl Length
[src]

[src]

Constructs a new length.

[src]

Constructs a new length with LengthUnit::None.

[src]

Constructs a new length with a zero value.

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

Trait Implementations

impl From<Length> for AttributeValue
[src]

[src]

Performs the conversion.

impl Clone for Length
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Length
[src]

impl PartialEq for Length
[src]

[src]

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

[src]

This method tests for !=.

impl Debug for Length
[src]

[src]

Formats the value using the given formatter. Read more

impl FromStr for Length
[src]

The associated error which can be returned from parsing.

[src]

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

impl ParseFromSpan for Length
[src]

Error type.

[src]

Parses data from a StrSpan.

impl WriteBuffer for Length
[src]

[src]

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

[src]

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

impl Display for Length
[src]

[src]

Formats the value using the given formatter. Read more

impl ToStringWithOptions for Length
[src]

[src]

Writes data to the String using specified WriteOptions.

Auto Trait Implementations

impl Send for Length

impl Sync for Length