pub struct WithMetadata<C, T> { /* private fields */ }Expand description
A wrapper for a computation that attaches additional metadata.
This can be used to carry extra information alongside a computation.
Implementations§
Source§impl<C, T> WithMetadata<C, T>
impl<C, T> WithMetadata<C, T>
Sourcepub const fn new(metadata: T, signal: C) -> WithMetadata<C, T>
pub const fn new(metadata: T, signal: C) -> WithMetadata<C, T>
Create a new computation with associated metadata.
Trait Implementations§
Source§impl<C, T> Clone for WithMetadata<C, T>
impl<C, T> Clone for WithMetadata<C, T>
Source§fn clone(&self) -> WithMetadata<C, T>
fn clone(&self) -> WithMetadata<C, T>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C, T> Debug for WithMetadata<C, T>
impl<C, T> Debug for WithMetadata<C, T>
Source§impl<C, T> Signal for WithMetadata<C, T>
Implementation of signal for WithMetadata.
impl<C, T> Signal for WithMetadata<C, T>
Implementation of signal for WithMetadata.
This delegates the computation to the wrapped value but enriches the watcher notifications with the metadata.
Auto Trait Implementations§
impl<C, T> Freeze for WithMetadata<C, T>
impl<C, T> RefUnwindSafe for WithMetadata<C, T>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<C, T> Send for WithMetadata<C, T>
impl<C, T> Sync for WithMetadata<C, T>
impl<C, T> Unpin for WithMetadata<C, T>
impl<C, T> UnwindSafe for WithMetadata<C, T>where
T: UnwindSafe,
C: UnwindSafe,
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
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 computation using the provided function. Read more
Source§fn zip<B: Signal>(self, b: B) -> Zip<Self, B>
fn zip<B: Signal>(self, b: B) -> Zip<Self, B>
Combines this computation with another computation. Read more
Source§fn computed(self) -> Computed<Self::Output>where
Self: Clone + 'static,
fn computed(self) -> Computed<Self::Output>where
Self: Clone + 'static,
Converts this computation into a
Computed wrapper. Read moreSource§fn with<T>(self, metadata: T) -> WithMetadata<Self, T>
fn with<T>(self, metadata: T) -> WithMetadata<Self, T>
Attaches metadata to this computation. Read more
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.