[][src]Struct svgdom::Attribute

pub struct Attribute {
    pub name: AttributeQName,
    pub value: AttributeValue,
}

Representation of the SVG attribute object.

Fields

name: AttributeQName

Attribute name.

value: AttributeValue

Attribute value.

Methods

impl Attribute[src]

pub fn new<'a, N, T>(name: N, value: T) -> Attribute where
    AttributeQNameRef<'a>: From<N>,
    AttributeValue: From<T>, 
[src]

Constructs a new attribute.

pub fn new_default(id: AttributeId) -> Option<Attribute>[src]

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

pub fn id(&self) -> Option<AttributeId>[src]

Returns an SVG attribute ID.

pub fn has_id(&self, id: AttributeId) -> bool[src]

Returns true if the attribute has the selected ID.

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

Returns true if the attribute is an SVG attribute.

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_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]

Trait Implementations

impl AttributeType for Attribute[src]

impl<'a, N, V> From<(N, V)> for Attribute where
    AttributeQNameRef<'a>: From<N>,
    AttributeValue: From<V>, 
[src]

impl<'a, N> From<(N, Node<NodeData>)> for Attribute where
    AttributeQNameRef<'a>: From<N>,
    N: Clone
[src]

impl<'a, N> From<(N, (Node<NodeData>, Option<PaintFallback>))> for Attribute where
    AttributeQNameRef<'a>: From<N>,
    N: Clone
[src]

impl PartialEq<Attribute> for Attribute[src]

impl Clone for Attribute[src]

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

Performs copy-assignment from source. Read more

impl Display for Attribute[src]

impl Debug for Attribute[src]

Auto Trait Implementations

impl !Send for Attribute

impl Unpin for Attribute

impl !Sync for Attribute

impl !UnwindSafe for Attribute

impl !RefUnwindSafe for Attribute

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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