[−][src]Enum sauron::prelude::html::attributes::AttributeValue
Values of an attribute can be in these variants
Variants
FunctionCall(Value)
an argument value, to be called as parameter, the function is called to the element
Simple(Value)
a simple value, wrapper of primitive types
style values
no value
Implementations
impl AttributeValue
[src]
pub fn from_styles(styles: Vec<Style>) -> AttributeValue
[src]
create an attribute from Vec
pub fn from_value(value: Value) -> AttributeValue
[src]
create an attribute value from simple value
pub fn function_call(value: Value) -> AttributeValue
[src]
create an attribute from a function name
with arguments value
pub fn get_simple(&self) -> Option<&Value>
[src]
return the value if it is a Simple variant
pub fn get_function_call_value(&self) -> Option<&Value>
[src]
return the function call argument value if it is a FunctionCall variant
pub fn is_style(&self) -> bool
[src]
returns true if this attribute value is a style
pub fn as_style(&self) -> Option<&Vec<Style>>
[src]
return the styles if the attribute value is a style
pub fn is_function_call(&self) -> bool
[src]
return true if this is a function call
pub fn is_empty(&self) -> bool
[src]
returns true if this attribute value is empty
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 PartialEq<AttributeValue> for AttributeValue
[src]
fn eq(&self, other: &AttributeValue) -> bool
[src]
fn ne(&self, other: &AttributeValue) -> bool
[src]
impl StructuralPartialEq 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,
fn borrow(&self) -> &TⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
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, 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>,