[−][src]Enum wasm_svg_graphics::prelude::AttrValue
A value an Element Attribute may have
Variants
Color(Color)
TColor(TColor)
Integer(i32)
Float(f64)
NOTE
Will be rounded to two decimal points
PathDefinitionValue(PathDefinitionString)
Methods
impl AttributeValue
[src]
pub fn new_viewbox(x: i32, y: i32, width: i32, height: i32) -> AttributeValue
[src]
pub fn new_id(id: &str) -> Result<AttributeValue, usize>
[src]
pub fn new_color(red: u8, green: u8, blue: u8) -> AttributeValue
[src]
pub fn new_integer(number: i32) -> AttributeValue
[src]
pub fn new_float(number: f64) -> AttributeValue
[src]
pub fn new_reference(reference_id: &str) -> Result<AttributeValue, usize>
[src]
pub fn new_path_definition(path_string: PathDefinitionString) -> AttributeValue
[src]
Create a new AttributeValue::PathDefinitionValue
Trait Implementations
impl Clone for AttributeValue
[src]
fn clone(&self) -> AttributeValue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for AttributeValue
[src]
impl From<(i32, i32, i32, i32)> for AttributeValue
[src]
Shorthand to create [AttributeValue::ViewBox]
impl From<Color> for AttributeValue
[src]
Shorthand to create [AttributeValue::Color]
fn from(color: Color) -> AttributeValue
[src]
impl From<PathDefinitionString> for AttributeValue
[src]
Shorthand to create [AttributeValue::PathDefinitionValue]
fn from(path_string: PathDefinitionString) -> AttributeValue
[src]
impl From<TColor> for AttributeValue
[src]
Shorthand to create [AttributeValue::TColor]
fn from(color: TColor) -> AttributeValue
[src]
impl From<f64> for AttributeValue
[src]
Shorthand to create [AttributeValue::Float]
fn from(number: f64) -> AttributeValue
[src]
impl From<i32> for AttributeValue
[src]
Shorthand to create [AttributeValue::Integer]
fn from(number: i32) -> AttributeValue
[src]
impl Hash for AttributeValue
[src]
fn hash<T>(&self, state: &mut T) where
T: Hasher,
[src]
T: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl ToString for AttributeValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for AttributeValue
impl Send for AttributeValue
impl Sync for AttributeValue
impl Unpin for AttributeValue
impl UnwindSafe for AttributeValue
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,