Enum svgparser::AttributeValue [] [src]

pub enum AttributeValue<'a> {
    Number(f64),
    NumberList(NumberList<'a>),
    Length(Length),
    LengthList(LengthList<'a>),
    Color(Color),
    ViewBox(ViewBox),
    AspectRatio(AspectRatio),
    Points(Points<'a>),
    Path(Tokenizer<'a>),
    Style(Tokenizer<'a>),
    Transform(Tokenizer<'a>),
    EntityRef(&'a str),
    IRI(&'a str),
    FuncIRI(&'a str),
    FuncIRIWithFallback(&'a strPaintFallback),
    PredefValue(ValueId),
    String(&'a str),
}

Representation of the SVG attribute value.

Variants

<number> type.

<list-of-numbers> type.

<length> type.

<list-of-lengths> type.

<color> type.

<viewBox> type.

Representation of the preserveAspectRatio attribute.

<path> type.

<style> type.

Reference to the ENTITY. Contains only name from &name;.

<IRI> type.

<FuncIRI> type.

<FuncIRI> type with a fallback value.

ID of the predefined value.

Unknown data.

Methods

impl<'a> AttributeValue<'a>
[src]

[src]

Parses AttributeValue from StrSpan.

This function supports all presentation attributes.

Errors

  • Most of the StreamError's can occur.
  • Data of an unknown attribute will be parsed as AttributeValue::String without errors.

Notes

  • enable-background is not fully implemented. This function will try to parse a single predefined value. Other data will be parsed as AttributeValue::String.
  • opacity value will be bounded to 0..1 range.
  • This function didn't correct most of the numeric values. Like rect's negative size, etc.
  • If prefix is not empty and aid is not Href, then AttributeValue::String will be removed.

[src]

Parses AttributeValue from string.

The same as from_frame.

Trait Implementations

impl<'a> Debug for AttributeValue<'a>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> Clone for AttributeValue<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Copy for AttributeValue<'a>
[src]

impl<'a> PartialEq for AttributeValue<'a>
[src]

[src]

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

[src]

This method tests for !=.

Auto Trait Implementations

impl<'a> Send for AttributeValue<'a>

impl<'a> Sync for AttributeValue<'a>