Struct svgdom::Attributes [] [src]

pub struct Attributes(_);

Wrapper around attributes list.

More low level API than in Node, but it supports getting a reference to the attribute, and not only copy like Node's API.

Use with care, since it didn't perform many check from Node's API.

Methods

impl Attributes
[src]

Constructs a new attribute.

Warning: newer construct it manually. All nodes have Attributes by default.

Returns an optional reference to Attribute.

Returns an optional mutable reference to Attribute.

Returns an optional reference to AttributeValue.

Returns an optional mutable reference to AttributeValue.

Inserts a new attribute. Previous will be overwritten.

Warning: this method did not perform any checks for linked attributes. If you want to insert an linked attribute - use Node::set_link_attribute().

Creates a new attribute from name and value and inserts it. Previous will be overwritten.

Warning: this method did not perform any checks for linked attributes. If you want to insert an linked attribute - use Node::set_link_attribute().

Removes an existing attribute.

Warning: this method did not perform any checks for linked attributes. If you want to remove an linked attribute - use Node::remove_attribute().

Returns true if the container contains an attribute with such id.

Returns count of the attributes.

Returns true if attributes is empty.

Returns an iterator.

Returns a mutable iterator.

Returns an iterator over SVG attributes.

Shorthand for: iter().filter(|a| a.is_svg()).map(|a| (a.id().unwrap(), a))

Returns a mutable iterator over SVG attributes.

Shorthand for: iter_mut().filter(|a| a.is_svg()).map(|a| (a.id().unwrap(), a))

Retains only elements specified by the predicate.