Enum svgdom::AttributeValue
[−]
[src]
pub enum AttributeValue { Color(Color), Length(Length), LengthList(LengthList), Link(Node), FuncLink(Node), Number(f64), NumberList(NumberList), Path(Path), PredefValue(ValueId), String(String), Transform(Transform), }
Value of SVG attribute.
Variants
Color(Color)
Length(Length)
LengthList(LengthList)
Link(Node)
IRI
FuncLink(Node)
FuncIRI
Number(f64)
NumberList(NumberList)
Path(Path)
PredefValue(ValueId)
String(String)
Transform(Transform)
Methods
impl AttributeValue
[src]
fn as_color(&self) -> Option<&Color>
fn as_length(&self) -> Option<&Length>
fn as_length_list(&self) -> Option<&LengthList>
fn as_link(&self) -> Option<&Node>
fn as_func_link(&self) -> Option<&Node>
fn as_number(&self) -> Option<&f64>
fn as_number_list(&self) -> Option<&NumberList>
fn as_path(&self) -> Option<&Path>
fn as_predef_value(&self) -> Option<&ValueId>
fn as_string(&self) -> Option<&String>
fn as_transform(&self) -> Option<&Transform>
fn default_value(id: AttributeId) -> Option<AttributeValue>
Constructs a new attribute value with default value, if it's known.
Trait Implementations
impl Clone for AttributeValue
[src]
fn clone(&self) -> AttributeValue
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for AttributeValue
[src]
fn eq(&self, __arg_0: &AttributeValue) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AttributeValue) -> bool
This method tests for !=
.
impl Debug for AttributeValue
[src]
impl<'a> From<&'a str> for AttributeValue
[src]
fn from(value: &str) -> AttributeValue
Performs the conversion.
impl From<String> for AttributeValue
[src]
fn from(value: String) -> AttributeValue
Performs the conversion.
impl From<i32> for AttributeValue
[src]
fn from(value: i32) -> AttributeValue
Performs the conversion.
impl From<f64> for AttributeValue
[src]
fn from(value: f64) -> AttributeValue
Performs the conversion.
impl From<NumberList> for AttributeValue
[src]
fn from(value: NumberList) -> AttributeValue
Performs the conversion.
impl From<Length> for AttributeValue
[src]
fn from(value: Length) -> AttributeValue
Performs the conversion.
impl From<(i32, LengthUnit)> for AttributeValue
[src]
fn from(value: (i32, LengthUnit)) -> AttributeValue
Performs the conversion.
impl From<(f64, LengthUnit)> for AttributeValue
[src]
fn from(value: (f64, LengthUnit)) -> AttributeValue
Performs the conversion.
impl From<LengthList> for AttributeValue
[src]
fn from(value: LengthList) -> AttributeValue
Performs the conversion.
impl From<Transform> for AttributeValue
[src]
fn from(value: Transform) -> AttributeValue
Performs the conversion.
impl From<Path> for AttributeValue
[src]
fn from(value: Path) -> AttributeValue
Performs the conversion.
impl From<Color> for AttributeValue
[src]
fn from(value: Color) -> AttributeValue
Performs the conversion.
impl From<ValueId> for AttributeValue
[src]
fn from(value: ValueId) -> AttributeValue
Performs the conversion.
impl WriteBuffer for AttributeValue
[src]
fn write_buf_opt(&self, opt: &WriteOptions, buf: &mut Vec<u8>)
Writes data to Vec<u8>
buffer using specified WriteOptions.
fn write_buf(&self, buf: &mut Vec<u8>)
Writes data to Vec<u8>
buffer using default WriteOptions.
impl Display for AttributeValue
[src]
impl WriteToString for AttributeValue
[src]
fn to_string_with_opt(&self, opt: &WriteOptions) -> String
Writes data to String
using specified WriteOptions.