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.
Implementations
Trait Implementations§
Source§impl AttributeValue for StringAttribute
impl AttributeValue for StringAttribute
Source§impl<T, U> From<ReadSignal<U>> for MaybeDyn<T>
impl<T, U> From<ReadSignal<U>> for MaybeDyn<T>
Source§fn from(val: ReadSignal<U>) -> MaybeDyn<T>
fn from(val: ReadSignal<U>) -> MaybeDyn<T>
Converts to this type from the input type.