Type Alias StringAttribute

Source
pub type StringAttribute = MaybeDyn<Option<Cow<'static, str>>>;
Expand description

Type alias representing a possibly dynamic string value.

Aliased Type§

enum StringAttribute {
    Static(Option<Cow<'static, str>>),
    Signal(ReadSignal<Option<Cow<'static, str>>>),
    Derived(Rc<dyn Fn() -> MaybeDyn<Option<Cow<'static, str>>>>),
}

Variants§

§

Static(Option<Cow<'static, str>>)

A static value.

§

Signal(ReadSignal<Option<Cow<'static, str>>>)

A dynamic value backed by a signal.

§

Derived(Rc<dyn Fn() -> MaybeDyn<Option<Cow<'static, str>>>>)

A derived dynamic value.

Trait Implementations§

Source§

impl AttributeValue for StringAttribute

Source§

fn set_self(self, el: &mut HtmlNode, name: Cow<'static, str>)