Enum sauron::prelude::AttributeValue

source ·
pub enum AttributeValue<MSG> {
    Simple(Value),
    Style(Vec<Style>),
    EventListener(Callback<Event, MSG>),
    ComponentEventListener(Callback<Event, ()>),
    Empty,
}
Expand description

Values of an attribute can be in these variants

Variants§

§

Simple(Value)

a simple value, wrapper of primitive types

§

Style(Vec<Style>)

style values

§

EventListener(Callback<Event, MSG>)

Event EventCallback

§

ComponentEventListener(Callback<Event, ()>)

Component Event Listener

§

Empty

no value

Implementations§

source§

impl<MSG> AttributeValue<MSG>

source

pub fn from_styles( styles: impl IntoIterator<Item = Style> ) -> AttributeValue<MSG>

create an attribute from Vec