pub struct SignalField<M, T>{ /* private fields */ }
Implementations§
Source§impl<M, T> SignalField<M, T>
impl<M, T> SignalField<M, T>
pub fn new(value: T) -> SignalField<M, T>
Trait Implementations§
Source§impl<M, T> Clone for SignalField<M, T>
impl<M, T> Clone for SignalField<M, T>
Source§fn clone(&self) -> SignalField<M, T>
fn clone(&self) -> SignalField<M, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<M, T> Field for SignalField<M, T>
impl<M, T> Field for SignalField<M, T>
Source§impl<M, T> SignalGet for SignalField<M, T>
impl<M, T> SignalGet for SignalField<M, T>
Source§impl<M, T> SignalGetUntracked for SignalField<M, T>
impl<M, T> SignalGetUntracked for SignalField<M, T>
Source§fn get_untracked(&self) -> <SignalField<M, T> as SignalGetUntracked>::Value
fn get_untracked(&self) -> <SignalField<M, T> as SignalGetUntracked>::Value
Gets the signal’s value without creating a dependency on the
current scope. Read more
Source§fn try_get_untracked(
&self,
) -> Option<<SignalField<M, T> as SignalGetUntracked>::Value>
fn try_get_untracked( &self, ) -> Option<<SignalField<M, T> as SignalGetUntracked>::Value>
Gets the signal’s value without creating a dependency on the
current scope. Returns [
Some(T)
] if the signal is still
valid, None
otherwise.Source§impl<M, T> SignalWith for SignalField<M, T>
impl<M, T> SignalWith for SignalField<M, T>
Source§fn with<O>(
&self,
f: impl FnOnce(&<SignalField<M, T> as SignalWith>::Value) -> O,
) -> O
fn with<O>( &self, f: impl FnOnce(&<SignalField<M, T> as SignalWith>::Value) -> O, ) -> O
Applies a function to the current value of the signal, and subscribes
the running effect to this signal. Read more
Source§fn try_with<O>(
&self,
f: impl FnOnce(&<SignalField<M, T> as SignalWith>::Value) -> O,
) -> Option<O>
fn try_with<O>( &self, f: impl FnOnce(&<SignalField<M, T> as SignalWith>::Value) -> O, ) -> Option<O>
Source§impl<M, T> SignalWithUntracked for SignalField<M, T>
impl<M, T> SignalWithUntracked for SignalField<M, T>
Source§fn with_untracked<O>(
&self,
f: impl FnOnce(&<SignalField<M, T> as SignalWithUntracked>::Value) -> O,
) -> O
fn with_untracked<O>( &self, f: impl FnOnce(&<SignalField<M, T> as SignalWithUntracked>::Value) -> O, ) -> O
Runs the provided closure with a reference to the current
value without creating a dependency on the current scope. Read more
Source§fn try_with_untracked<O>(
&self,
f: impl FnOnce(&<SignalField<M, T> as SignalWithUntracked>::Value) -> O,
) -> Option<O>
fn try_with_untracked<O>( &self, f: impl FnOnce(&<SignalField<M, T> as SignalWithUntracked>::Value) -> O, ) -> Option<O>
Runs the provided closure with a reference to the current
value without creating a dependency on the current scope.
Returns [
Some(O)
] if the signal is still valid, None
otherwise.impl<M, T> Copy for SignalField<M, T>
Auto Trait Implementations§
impl<M, T> Freeze for SignalField<M, T>
impl<M, T> !RefUnwindSafe for SignalField<M, T>
impl<M, T> !Send for SignalField<M, T>
impl<M, T> !Sync for SignalField<M, T>
impl<M, T> Unpin for SignalField<M, T>
impl<M, T> !UnwindSafe for SignalField<M, T>
Blanket Implementations§
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<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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more