[][src]Enum svgdom::AttributeValue

pub enum AttributeValue {
    None,
    Inherit,
    CurrentColor,
    AspectRatio(AspectRatio),
    Color(Color),
    FuncLink(Node),
    Paint(NodeOption<PaintFallback>),
    Length(Length),
    LengthList(LengthList),
    Angle(Angle),
    Link(Node),
    Number(f64),
    NumberList(NumberList),
    Path(Path),
    Points(Points),
    Transform(Transform),
    ViewBox(ViewBox),
    String(String),
}

Value of the SVG attribute.

Variants

NoneInheritCurrentColorAspectRatio(AspectRatio)Color(Color)FuncLink(Node)

FuncIRI

Paint(NodeOption<PaintFallback>)Length(Length)LengthList(LengthList)Angle(Angle)Link(Node)

IRI

Number(f64)NumberList(NumberList)Path(Path)Points(Points)Transform(Transform)ViewBox(ViewBox)String(String)

Methods

impl AttributeValue[src]

pub fn is_none(&self) -> bool[src]

pub fn is_inherit(&self) -> bool[src]

pub fn is_current_color(&self) -> bool[src]

pub fn is_aspect_ratio(&self) -> bool[src]

pub fn is_color(&self) -> bool[src]

pub fn is_length(&self) -> bool[src]

pub fn is_length_list(&self) -> bool[src]

pub fn is_angle(&self) -> bool[src]

pub fn is_paint(&self) -> bool[src]

pub fn is_number(&self) -> bool[src]

pub fn is_number_list(&self) -> bool[src]

pub fn is_path(&self) -> bool[src]

pub fn is_points(&self) -> bool[src]

pub fn is_string(&self) -> bool[src]

pub fn is_transform(&self) -> bool[src]

pub fn is_viewbox(&self) -> bool[src]

Checks that the current attribute value contains a Node.

E.g. Link, FuncLink and Paint.

pub fn default_value(id: AttributeId) -> Option<AttributeValue>[src]

Constructs a new attribute value with a default value, if it's known.

Trait Implementations

impl WriteBuffer for AttributeValue[src]

fn write_buf(&self, buf: &mut Vec<u8>)[src]

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

fn with_write_opt<'a>(&'a self, opt: &'a WriteOptions) -> DisplaySvg<'a, Self> where
    Self: Sized
[src]

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

impl PartialEq<AttributeValue> for AttributeValue[src]

impl From<AspectRatio> for AttributeValue[src]

impl From<Color> for AttributeValue[src]

impl From<Length> for AttributeValue[src]

impl From<LengthList> for AttributeValue[src]

impl From<Angle> for AttributeValue[src]

impl From<f64> for AttributeValue[src]

impl From<NumberList> for AttributeValue[src]

impl From<Path> for AttributeValue[src]

impl From<Points> for AttributeValue[src]

impl From<String> for AttributeValue[src]

impl From<Transform> for AttributeValue[src]

impl From<ViewBox> for AttributeValue[src]

impl<'a> From<&'a str> for AttributeValue[src]

impl From<i32> for AttributeValue[src]

impl From<(i32, LengthUnit)> for AttributeValue[src]

impl From<(f64, LengthUnit)> for AttributeValue[src]

impl From<PaintFallback> for AttributeValue[src]

impl Clone for AttributeValue[src]

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

Performs copy-assignment from source. Read more

impl Display for AttributeValue[src]

impl Debug for AttributeValue[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]