Type Alias BoolAttribute
pub type BoolAttribute = MaybeDyn<bool>;
Expand description
Type alias respresenting a possibly dynamic boolean value.
Aliased Type§
enum BoolAttribute {
Static(bool),
Signal(ReadSignal<bool>),
Derived(Rc<dyn Fn() -> MaybeDyn<bool>>),
}
Variants§
Static(bool)
A static value.
Signal(ReadSignal<bool>)
A dynamic value backed by a signal.
Derived(Rc<dyn Fn() -> MaybeDyn<bool>>)
A derived dynamic value.
Implementations
§impl<T> MaybeDyn<T>
impl<T> MaybeDyn<T>
pub fn evaluate(self) -> Twhere
T: Clone,
pub fn evaluate(self) -> Twhere
T: Clone,
Get the value by consuming itself. Unlike get_clone
, this method avoids
a clone if we are just storing a static value.
pub fn track(&self)
pub fn track(&self)
Track the reactive dependencies, if it is dynamic.