[−][src]Enum sauron_core::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>) -> Self
[src]
create an attribute from Vec
pub fn from_value(value: Value) -> Self
[src]
create an attribute value from simple value
pub fn function_call(value: Value) -> Self
[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]
pub fn clone(&self) -> AttributeValue
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for AttributeValue
[src]
impl PartialEq<AttributeValue> for AttributeValue
[src]
pub fn eq(&self, other: &AttributeValue) -> bool
[src]
pub fn ne(&self, other: &AttributeValue) -> bool
[src]
impl StructuralPartialEq for AttributeValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for AttributeValue
[src]
impl Send for AttributeValue
[src]
impl Sync for AttributeValue
[src]
impl Unpin for AttributeValue
[src]
impl UnwindSafe for AttributeValue
[src]
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,