Enum sauron::html::attributes::AttributeValue [−][src]
pub enum AttributeValue<MSG> {
FunctionCall(Value),
Simple(Value),
Style(Vec<Style, Global>),
EventListener(Listener<Event, MSG>),
Empty,
}
Expand description
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
Tuple Fields of FunctionCall
0: Value
Simple(Value)
a simple value, wrapper of primitive types
Tuple Fields of Simple
0: Value
style values
Event Listener
no value
Implementations
create an attribute from Vec
create an attribute value from simple value
create an attribute from a function name
with arguments value
return the value if it is a Simple variant
return the function call argument value if it is a FunctionCall variant
return the styles if the attribute value is a style
return the styles if the attribute value is a style
return true if this is a function call
pub fn map_callback<MSG2>(self, cb: Listener<MSG, MSG2>) -> AttributeValue<MSG2> where
MSG2: 'static,
pub fn map_callback<MSG2>(self, cb: Listener<MSG, MSG2>) -> AttributeValue<MSG2> where
MSG2: 'static,
map the callback of this attribute using another callback
Trait Implementations
This is written manually, so we don’t push constraint on MSG to be Clone
This is written manually, so we don’t push constraint on MSG to be Debug
This is written manually, so we don’t push constraint on MSG to be PartialEq
Auto Trait Implementations
impl<MSG> !RefUnwindSafe for AttributeValue<MSG>
impl<MSG> !Send for AttributeValue<MSG>
impl<MSG> !Sync for AttributeValue<MSG>
impl<MSG> Unpin for AttributeValue<MSG>
impl<MSG> !UnwindSafe for AttributeValue<MSG>
Blanket Implementations
Mutably borrows from an owned value. Read more