pub struct Computed<T>(/* private fields */);Expand description
A wrapper around a boxed implementation of the ComputedImpl trait.
This type represents a computation that can be evaluated to produce a result of type T.
The computation is stored as a boxed trait object, allowing for dynamic dispatch.
Implementations§
Trait Implementations§
Source§impl<T, C2> Add<C2> for Computed<T>
impl<T, C2> Add<C2> for Computed<T>
Source§impl<T> Debug for Computed<T>
Implements Debug for Computed<T>.
impl<T> Debug for Computed<T>
Implements Debug for Computed<T>.
This just outputs the type name rather than any internal details.
Source§impl<T> Default for Computed<T>
Implements Default for Computed<T> when T implements Default.
impl<T> Default for Computed<T>
Implements Default for Computed<T> when T implements Default.
This creates a constant computation with the default value of T.
Source§impl<T> Signal for Computed<T>where
T: 'static,
Implements Compute for Computed<T>.
impl<T> Signal for Computed<T>where
T: 'static,
Implements Compute for Computed<T>.
This delegates to the internal boxed implementation.
Auto Trait Implementations§
impl<T> Freeze for Computed<T>
impl<T> !RefUnwindSafe for Computed<T>
impl<T> !Send for Computed<T>
impl<T> !Sync for Computed<T>
impl<T> Unpin for Computed<T>
impl<T> !UnwindSafe for Computed<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.