Struct svgdom::Attribute [−][src]
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]
impl Attribute
pub fn new<'a, N, T>(name: N, value: T) -> Attribute where
AttributeQNameRef<'a>: From<N>,
AttributeValue: From<T>,
[src]
pub fn new<'a, N, T>(name: N, value: T) -> Attribute where
AttributeQNameRef<'a>: From<N>,
AttributeValue: From<T>,
Constructs a new attribute.
pub fn new_default(id: AttributeId) -> Option<Attribute>
[src]
pub fn new_default(id: AttributeId) -> Option<Attribute>
Constructs a new attribute with a default value, if it known.
pub fn id(&self) -> Option<AttributeId>
[src]
pub fn id(&self) -> Option<AttributeId>
Returns an SVG attribute ID.
pub fn has_id(&self, id: AttributeId) -> bool
[src]
pub fn has_id(&self, id: AttributeId) -> bool
Returns true
if the attribute has the selected ID.
pub fn is_svg(&self) -> bool
[src]
pub fn is_svg(&self) -> bool
Returns true
if the attribute is an SVG attribute.
pub fn is_none(&self) -> bool
[src]
pub fn is_none(&self) -> bool
pub fn is_inherit(&self) -> bool
[src]
pub fn is_inherit(&self) -> bool
pub fn is_current_color(&self) -> bool
[src]
pub fn is_current_color(&self) -> bool
pub fn is_aspect_ratio(&self) -> bool
[src]
pub fn is_aspect_ratio(&self) -> bool
pub fn is_color(&self) -> bool
[src]
pub fn is_color(&self) -> bool
pub fn is_length(&self) -> bool
[src]
pub fn is_length(&self) -> bool
pub fn is_length_list(&self) -> bool
[src]
pub fn is_length_list(&self) -> bool
pub fn is_link(&self) -> bool
[src]
pub fn is_link(&self) -> bool
pub fn is_func_link(&self) -> bool
[src]
pub fn is_func_link(&self) -> bool
pub fn is_paint(&self) -> bool
[src]
pub fn is_paint(&self) -> bool
pub fn is_number(&self) -> bool
[src]
pub fn is_number(&self) -> bool
pub fn is_number_list(&self) -> bool
[src]
pub fn is_number_list(&self) -> bool
pub fn is_path(&self) -> bool
[src]
pub fn is_path(&self) -> bool
pub fn is_points(&self) -> bool
[src]
pub fn is_points(&self) -> bool
pub fn is_string(&self) -> bool
[src]
pub fn is_string(&self) -> bool
pub fn is_transform(&self) -> bool
[src]
pub fn is_transform(&self) -> bool
pub fn is_viewbox(&self) -> bool
[src]
pub fn is_viewbox(&self) -> bool
pub fn is_link_container(&self) -> bool
[src]
pub fn is_link_container(&self) -> bool
Trait Implementations
impl Clone for Attribute
[src]
impl Clone for Attribute
fn clone(&self) -> Attribute
[src]
fn clone(&self) -> Attribute
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Attribute
[src]
impl PartialEq for Attribute
fn eq(&self, other: &Attribute) -> bool
[src]
fn eq(&self, other: &Attribute) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Attribute) -> bool
[src]
fn ne(&self, other: &Attribute) -> bool
This method tests for !=
.
impl Debug for Attribute
[src]
impl Debug for Attribute
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl WriteBuffer for Attribute
[src]
impl WriteBuffer for Attribute
fn write_buf_opt(&self, opt: &WriteOptions, buf: &mut Vec<u8>)
[src]
fn write_buf_opt(&self, opt: &WriteOptions, buf: &mut Vec<u8>)
Writes data to the Vec<u8>
buffer using specified WriteOptions
.
fn write_buf(&self, buf: &mut Vec<u8>)
[src]
fn write_buf(&self, buf: &mut Vec<u8>)
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]
fn with_write_opt<'a>(&'a self, opt: &'a WriteOptions) -> DisplaySvg<'a, Self> where
Self: Sized,
Returns an object that implements fmt::Display
using provided write options.
impl Display for Attribute
[src]
impl Display for Attribute
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, N, V> From<(N, V)> for Attribute where
AttributeQNameRef<'a>: From<N>,
AttributeValue: From<V>,
[src]
impl<'a, N, V> From<(N, V)> for Attribute where
AttributeQNameRef<'a>: From<N>,
AttributeValue: From<V>,
impl<'a, N> From<(N, Node)> for Attribute where
AttributeQNameRef<'a>: From<N>,
N: Clone,
[src]
impl<'a, N> From<(N, Node)> for Attribute where
AttributeQNameRef<'a>: From<N>,
N: Clone,
impl<'a, N> From<(N, (Node, Option<PaintFallback>))> for Attribute where
AttributeQNameRef<'a>: From<N>,
N: Clone,
[src]
impl<'a, N> From<(N, (Node, Option<PaintFallback>))> for Attribute where
AttributeQNameRef<'a>: From<N>,
N: Clone,
impl AttributeType for Attribute
[src]
impl AttributeType for Attribute
fn is_presentation(&self) -> bool
[src]
fn is_presentation(&self) -> bool
Returns true
if the current attribute is part of presentation attributes. Read more
fn is_inheritable(&self) -> bool
[src]
fn is_inheritable(&self) -> bool
Returns true
if the current attribute is part of inheritable presentation attributes. Read more
fn is_animation_event(&self) -> bool
[src]
fn is_animation_event(&self) -> bool
Returns true
if the current attribute is part of animation event attributes. Read more
fn is_graphical_event(&self) -> bool
[src]
fn is_graphical_event(&self) -> bool
Returns true
if the current attribute is part of graphical event attributes. Read more
fn is_document_event(&self) -> bool
[src]
fn is_document_event(&self) -> bool
Returns true
if the current attribute is part of document event attributes. Read more
fn is_conditional_processing(&self) -> bool
[src]
fn is_conditional_processing(&self) -> bool
Returns true
if the current attribute is part of conditional processing attributes . Read more
fn is_core(&self) -> bool
[src]
fn is_core(&self) -> bool
Returns true
if the current attribute is part of core attributes. Read more
fn is_fill(&self) -> bool
[src]
fn is_fill(&self) -> bool
Returns true
if the current attribute is part of fill attributes. Read more
fn is_stroke(&self) -> bool
[src]
fn is_stroke(&self) -> bool
Returns true
if the current attribute is part of stroke attributes. Read more