pub struct Container<T>where
T: 'static,{ /* private fields */ }Expand description
A container for a value that can be observed.
The container is the basic implementation of a binding that holds a value and notifies watchers when the value changes.
Implementations§
Trait Implementations§
Source§impl<T> CustomBinding for Container<T>where
T: 'static + Clone,
impl<T> CustomBinding for Container<T>where
T: 'static + Clone,
Source§impl<T> Signal for Container<T>where
T: 'static + Clone,
impl<T> Signal for Container<T>where
T: 'static + Clone,
Source§fn watch(
&self,
watcher: impl Fn(Context<<Container<T> as Signal>::Output>) + 'static,
) -> <Container<T> as Signal>::Guard
fn watch( &self, watcher: impl Fn(Context<<Container<T> as Signal>::Output>) + 'static, ) -> <Container<T> as Signal>::Guard
Registers a watcher to be notified when the value changes.
Source§type Guard = Box<dyn WatcherGuard>
type Guard = Box<dyn WatcherGuard>
The guard type returned by the watch method that manages watcher lifecycle.
Auto Trait Implementations§
impl<T> Freeze for Container<T>
impl<T> !RefUnwindSafe for Container<T>
impl<T> !Send for Container<T>
impl<T> !Sync for Container<T>
impl<T> Unpin for Container<T>
impl<T> !UnwindSafe for Container<T>
Blanket Implementations§
Source§impl<S> AnimationExt for Swhere
S: SignalExt,
impl<S> AnimationExt for Swhere
S: SignalExt,
Source§fn animated(self) -> WithMetadata<Self, Animation>where
Self: Sized,
fn animated(self) -> WithMetadata<Self, Animation>where
Self: Sized,
Apply default animation to this reactive value Read more
Source§fn with_animation(self, animation: Animation) -> WithMetadata<Self, Animation>where
Self: Sized,
fn with_animation(self, animation: Animation) -> WithMetadata<Self, Animation>where
Self: Sized,
Apply a specific animation to this reactive value Read more
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, F, T1, T2, Output> FlattenMap<F, (T1, T2), Output> for C
impl<C, F, T1, T2, Output> FlattenMap<F, (T1, T2), Output> for C
Source§impl<C, F, T1, T2, T3, Output> FlattenMap<F, (T1, T2, T3), Output> for C
impl<C, F, T1, T2, T3, Output> FlattenMap<F, (T1, T2, T3), Output> for C
Source§impl<T> IdentifiableExt for T
impl<T> IdentifiableExt for T
Source§impl<C> SignalExt for Cwhere
C: Signal,
impl<C> SignalExt for Cwhere
C: Signal,
Source§fn map<F, Output>(self, f: F) -> Map<Self, F, Output>
fn map<F, Output>(self, f: F) -> Map<Self, F, Output>
Transforms the output of this signal using the provided function.
Source§fn cached(self) -> Cached<Self>
fn cached(self) -> Cached<Self>
Wraps this signal with caching to avoid redundant computations.
Source§fn computed(self) -> Computed<Self::Output>where
Self: 'static,
fn computed(self) -> Computed<Self::Output>where
Self: 'static,
Converts this signal into a type-erased
Computed container.Source§fn with<T>(self, metadata: T) -> WithMetadata<Self, T>
fn with<T>(self, metadata: T) -> WithMetadata<Self, T>
Attaches metadata to this signal’s watcher notifications.