Struct svgdom::Attribute [] [src]

pub struct Attribute {
    pub name: AttributeName,
    pub value: AttributeValue,
    pub visible: bool,
}

Representation of the SVG attribute object.

Fields

Attribute name.

Attribute value.

Visibility.

Unlike many other DOM implementations, libsvgdom supports hiding of the attributes, instead of removing them. Invisible attributes act just like other attributes, but they will not be printed during SVG writing. Unless you enable them via WriteOptions.

All attributes are visible by default.

Methods

impl Attribute
[src]

Constructs a new attribute.

Returns an SVG attribute ID.

Returns true if the attribute has the selected ID.

Returns true if the attribute is an SVG attribute.

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

Returns true if the current attribute's value is equal to a default by the SVG spec.

Trait Implementations

impl PartialEq for Attribute
[src]

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

This method tests for !=.

impl Clone for Attribute
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Attribute
[src]

Formats the value using the given formatter.

impl WriteBuffer for Attribute
[src]

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

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

impl Display for Attribute
[src]

Formats the value using the given formatter.

impl WriteToString for Attribute
[src]

Writes data to the String using specified WriteOptions.

impl AttributeType for Attribute
[src]

Returns true if the current attribute is part of presentation attributes. Read more

Returns true if the current attribute is part of inheritable presentation attributes. Read more

Returns true if the current attribute is part of animation event attributes. Read more

Returns true if the current attribute is part of graphical event attributes. Read more

Returns true if the current attribute is part of document event attributes. Read more

Returns true if the current attribute is part of conditional processing attributes . Read more

Returns true if the current attribute is part of core attributes. Read more

Returns true if the current attribute is part of fill attributes. Read more

Returns true if the current attribute is part of stroke attributes. Read more