Struct WriteSignal
pub struct WriteSignal<T, S = SyncStorage> {
pub(crate) inner: ArenaItem<ArcWriteSignal<T>, S>,
}
Expand description
An arena-allocated setter for a reactive signal.
A signal is a piece of data that may change over time, and notifies other code when it has changed.
This is an arena-allocated signal, which is Copy
and is disposed when its reactive
Owner
cleans up. For a reference-counted signal that lives
as long as a reference to it is alive, see ArcWriteSignal
.
ยงCore Trait Implementations
.set()
sets the signal to a new value..update()
updates the value of the signal by applying a closure that takes a mutable reference..write()
returns a guard through which the signal can be mutated, and which notifies subscribers when it is dropped.
Each of these has a related
_untracked()
method, which updates the signal without notifying subscribers. Untracked updates are not desirable in most cases, as they cause โtearingโ between the signalโs value and its observed value. If you want a non-reactive container, useArenaItem
instead.
ยงExamples
let (count, set_count) = signal(0);
// โ
calling the setter sets the value
// `set_count(1)` on nightly
set_count.set(1);
assert_eq!(count.get(), 1);
// โ you could call the getter within the setter
// set_count.set(count.get() + 1);
// โ
however it's more efficient to use .update() and mutate the value in place
set_count.update(|count: &mut i32| *count += 1);
assert_eq!(count.get(), 2);
// โ
`.write()` returns a guard that implements `DerefMut` and will notify when dropped
*set_count.write() += 1;
assert_eq!(count.get(), 3);
Fieldsยง
ยงinner: ArenaItem<ArcWriteSignal<T>, S>
Trait Implementationsยง
ยงimpl<T, S> Clone for WriteSignal<T, S>
impl<T, S> Clone for WriteSignal<T, S>
ยงfn clone(&self) -> WriteSignal<T, S>
fn clone(&self) -> WriteSignal<T, S>
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 moreยงimpl<T, S> Debug for WriteSignal<T, S>where
S: Debug,
impl<T, S> Debug for WriteSignal<T, S>where
S: Debug,
ยงimpl<T, S> DefinedAt for WriteSignal<T, S>
impl<T, S> DefinedAt for WriteSignal<T, S>
ยงfn defined_at(&self) -> Option<&'static Location<'static>>
fn defined_at(&self) -> Option<&'static Location<'static>>
Returns the location at which the signal was defined. This is usually simply
None
in
release mode.ยงimpl<T, S> Fn(T) for WriteSignal<T, S>where
WriteSignal<T, S>: Set<Value = T>,
impl<T, S> Fn(T) for WriteSignal<T, S>where
WriteSignal<T, S>: Set<Value = T>,
ยงimpl<T, S> FnMut(T) for WriteSignal<T, S>where
WriteSignal<T, S>: Set<Value = T>,
impl<T, S> FnMut(T) for WriteSignal<T, S>where
WriteSignal<T, S>: Set<Value = T>,
ยงimpl<T, S> FnOnce(T) for WriteSignal<T, S>where
WriteSignal<T, S>: Set<Value = T>,
impl<T, S> FnOnce(T) for WriteSignal<T, S>where
WriteSignal<T, S>: Set<Value = T>,
ยงimpl<T> From<ArcWriteSignal<T>> for WriteSignal<T>
impl<T> From<ArcWriteSignal<T>> for WriteSignal<T>
ยงfn from(value: ArcWriteSignal<T>) -> WriteSignal<T>
fn from(value: ArcWriteSignal<T>) -> WriteSignal<T>
Converts to this type from the input type.
ยงimpl<T, S> From<WriteSignal<T, S>> for SignalSetter<T, S>
impl<T, S> From<WriteSignal<T, S>> for SignalSetter<T, S>
ยงfn from(value: WriteSignal<T, S>) -> SignalSetter<T, S>
fn from(value: WriteSignal<T, S>) -> SignalSetter<T, S>
Converts to this type from the input type.
ยงimpl<T, S> From<WriteSignal<T, S>> for WriteModel<T, S>where
S: Storage<T>,
impl<T, S> From<WriteSignal<T, S>> for WriteModel<T, S>where
S: Storage<T>,
ยงfn from(write_signal: WriteSignal<T, S>) -> WriteModel<T, S>
fn from(write_signal: WriteSignal<T, S>) -> WriteModel<T, S>
Converts to this type from the input type.
ยงimpl<T> FromLocal<ArcWriteSignal<T>> for WriteSignal<T, LocalStorage>where
T: 'static,
impl<T> FromLocal<ArcWriteSignal<T>> for WriteSignal<T, LocalStorage>where
T: 'static,
ยงfn from_local(value: ArcWriteSignal<T>) -> WriteSignal<T, LocalStorage>
fn from_local(value: ArcWriteSignal<T>) -> WriteSignal<T, LocalStorage>
Converts between the types.
ยงimpl<T, S> Hash for WriteSignal<T, S>
impl<T, S> Hash for WriteSignal<T, S>
ยงimpl<T, S> IntoInner for WriteSignal<T, S>where
S: Storage<ArcWriteSignal<T>>,
impl<T, S> IntoInner for WriteSignal<T, S>where
S: Storage<ArcWriteSignal<T>>,
ยงfn into_inner(self) -> Option<<WriteSignal<T, S> as IntoInner>::Value>
fn into_inner(self) -> Option<<WriteSignal<T, S> as IntoInner>::Value>
Returns the inner value if this is the only reference to the signal.
Otherwise, returns
None
and drops this reference. Read moreยงimpl<T, S> IsDisposed for WriteSignal<T, S>
impl<T, S> IsDisposed for WriteSignal<T, S>
ยงfn is_disposed(&self) -> bool
fn is_disposed(&self) -> bool
If
true
, the signal cannot be accessed without a panic.ยงimpl<T, S> Notify for WriteSignal<T, S>where
T: 'static,
S: Storage<ArcWriteSignal<T>>,
impl<T, S> Notify for WriteSignal<T, S>where
T: 'static,
S: Storage<ArcWriteSignal<T>>,
ยงimpl<T, S> PartialEq for WriteSignal<T, S>
impl<T, S> PartialEq for WriteSignal<T, S>
ยงimpl<T, S> Write for WriteSignal<T, S>where
T: 'static,
S: Storage<ArcWriteSignal<T>>,
impl<T, S> Write for WriteSignal<T, S>where
T: 'static,
S: Storage<ArcWriteSignal<T>>,
ยงfn try_write(&self) -> Option<impl UntrackableGuard>
fn try_write(&self) -> Option<impl UntrackableGuard>
Returns the guard, or
None
if the signal has already been disposed.ยงfn try_write_untracked(&self) -> Option<impl DerefMut>
fn try_write_untracked(&self) -> Option<impl DerefMut>
or
None
if the signal has already been disposed.ยงfn write(&self) -> impl UntrackableGuard
fn write(&self) -> impl UntrackableGuard
Returns the guard. Read more
ยงfn write_untracked(&self) -> impl DerefMut
fn write_untracked(&self) -> impl DerefMut
Returns a guard that will not notify subscribers when dropped. Read more
impl<T, S> Copy for WriteSignal<T, S>
impl<T, S> Eq for WriteSignal<T, S>
Auto Trait Implementationsยง
impl<T, S> Freeze for WriteSignal<T, S>
impl<T, S> RefUnwindSafe for WriteSignal<T, S>
impl<T, S> Send for WriteSignal<T, S>
impl<T, S> Sync for WriteSignal<T, S>
impl<T, S> Unpin for WriteSignal<T, S>
impl<T, S> UnwindSafe for WriteSignal<T, S>
Blanket Implementationsยง
Sourceยงimpl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Sourceยงfn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Convert the source color to the destination color using the specified
method.
Sourceยงfn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default.
ยงimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
ยงtype ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
ยงfn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Sourceยงimpl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Sourceยงfn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Cast a collection of colors into a collection of arrays.
Sourceยงimpl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Sourceยงfn arrays_into(self) -> C
fn arrays_into(self) -> C
Cast this collection of arrays into a collection of colors.
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
ยงimpl<T> CallHasher for T
impl<T> CallHasher for T
Sourceยงimpl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Sourceยงtype Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
The number type thatโs used in
parameters
when converting.Sourceยงfn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
Converts
self
into C
, using the provided parameters.Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
ยงimpl<Func, T, P> ComponentConstructor<P, T> for Funcwhere
Func: FnOnce(P) -> T,
P: PropsOrNoPropsBuilder,
impl<Func, T, P> ComponentConstructor<P, T> for Funcwhere
Func: FnOnce(P) -> T,
P: PropsOrNoPropsBuilder,
Sourceยงimpl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Sourceยงfn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Cast a collection of colors into a collection of color components.
ยงimpl<F, TScore> CustomSegmentScorer<TScore> for F
impl<F, TScore> CustomSegmentScorer<TScore> for F
ยงimpl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
ยงfn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
ยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.ยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
โs vtable from &Trait
โs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
โs vtable from &mut Trait
โs.ยงimpl<T> DowncastSend for T
impl<T> DowncastSend for T
ยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
ยงimpl<Func, T> EffectFunction<T, SingleParam> for Func
impl<Func, T> EffectFunction<T, SingleParam> for Func
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.ยงimpl<F> ErrorSink for Fwhere
F: FnMut(ParseError),
impl<F> ErrorSink for Fwhere
F: FnMut(ParseError),
fn report_error(&mut self, error: ParseError)
ยงimpl<F> EventReceiver for Fwhere
F: FnMut(Event),
impl<F> EventReceiver for Fwhere
F: FnMut(Event),
fn std_table_open(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn std_table_close(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn array_table_open(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn array_table_close(&mut self, span: Span, _error: &mut dyn ErrorSink)
ยงfn inline_table_open(&mut self, span: Span, _error: &mut dyn ErrorSink) -> bool
fn inline_table_open(&mut self, span: Span, _error: &mut dyn ErrorSink) -> bool
Returns if entering the inline table is allowed
fn inline_table_close(&mut self, span: Span, _error: &mut dyn ErrorSink)
ยงfn array_open(&mut self, span: Span, _error: &mut dyn ErrorSink) -> bool
fn array_open(&mut self, span: Span, _error: &mut dyn ErrorSink) -> bool
Returns if entering the array is allowed
fn array_close(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn simple_key( &mut self, span: Span, encoding: Option<Encoding>, _error: &mut dyn ErrorSink, )
fn key_sep(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn key_val_sep(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn scalar( &mut self, span: Span, encoding: Option<Encoding>, _error: &mut dyn ErrorSink, )
fn value_sep(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn whitespace(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn comment(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn newline(&mut self, span: Span, _error: &mut dyn ErrorSink)
fn error(&mut self, span: Span, _error: &mut dyn ErrorSink)
Sourceยงimpl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Sourceยงfn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
Performs a conversion from
angle
.Sourceยงimpl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Sourceยงfn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
Converts
other
into Self
, while performing the appropriate scaling,
rounding and clamping.ยงimpl<T> Instrument for T
impl<T> Instrument for T
ยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงimpl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Sourceยงfn into_angle(self) -> U
fn into_angle(self) -> U
Performs a conversion into
T
.Sourceยงimpl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Sourceยงtype Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
The number type thatโs used in
parameters
when converting.Sourceยงfn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
Converts
self
into C
, using the provided parameters.Sourceยงimpl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Sourceยงfn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Sourceยงimpl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Sourceยงfn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
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ยงimpl<F, T, S> IntoSignalSetter<T, S> for F
impl<F, T, S> IntoSignalSetter<T, S> for F
ยงfn into_signal_setter(self) -> SignalSetter<T, S>
fn into_signal_setter(self) -> SignalSetter<T, S>
Consumes
self
, returning SignalSetter<T>
.Sourceยงimpl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Sourceยงfn into_stimulus(self) -> T
fn into_stimulus(self) -> T
Converts
self
into T
, while performing the appropriate scaling,
rounding and clamping.ยงimpl<F> OnFailedUpgrade for F
impl<F> OnFailedUpgrade for F
ยงimpl<T> Pointable for T
impl<T> Pointable for T
ยงimpl<T> Pointee for T
impl<T> Pointee for T
ยงimpl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
ยงimpl<T> SerializableKey for T
impl<T> SerializableKey for T
ยงimpl<T> Set for Twhere
T: Update + IsDisposed,
impl<T> Set for Twhere
T: Update + IsDisposed,
ยงimpl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
ยงfn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
ยงfn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.
Sourceยงimpl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Sourceยงtype Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
The error for when
try_into_colors
fails to cast.Sourceยงfn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Try to cast this collection of color components into a collection of
colors. Read more
Sourceยงimpl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Sourceยงfn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an
OutOfBounds
error is returned which contains
the unclamped color. Read moreSourceยงimpl<C, U> UintsFrom<C> for Uwhere
C: IntoUints<U>,
impl<C, U> UintsFrom<C> for Uwhere
C: IntoUints<U>,
Sourceยงfn uints_from(colors: C) -> U
fn uints_from(colors: C) -> U
Cast a collection of colors into a collection of unsigned integers.
Sourceยงimpl<C, U> UintsInto<C> for Uwhere
C: FromUints<U>,
impl<C, U> UintsInto<C> for Uwhere
C: FromUints<U>,
Sourceยงfn uints_into(self) -> C
fn uints_into(self) -> C
Cast this collection of unsigned integers into a collection of colors.
ยงimpl<T> Update for Twhere
T: Write,
impl<T> Update for Twhere
T: Write,
ยงfn try_maybe_update<U>(
&self,
fun: impl FnOnce(&mut <T as Update>::Value) -> (bool, U),
) -> Option<U>
fn try_maybe_update<U>( &self, fun: impl FnOnce(&mut <T as Update>::Value) -> (bool, U), ) -> Option<U>
Updates the value of the signal, notifying subscribers if the update function returns
(true, _)
, and returns the value returned by the update function,
or None
if the signal has already been disposed.ยงfn update(&self, fun: impl FnOnce(&mut Self::Value))
fn update(&self, fun: impl FnOnce(&mut Self::Value))
Updates the value of the signal and notifies subscribers.
ยงfn maybe_update(&self, fun: impl FnOnce(&mut Self::Value) -> bool)
fn maybe_update(&self, fun: impl FnOnce(&mut Self::Value) -> bool)
Updates the value of the signal, but only notifies subscribers if the function
returns
true
.ยงfn try_update<U>(&self, fun: impl FnOnce(&mut Self::Value) -> U) -> Option<U>
fn try_update<U>(&self, fun: impl FnOnce(&mut Self::Value) -> U) -> Option<U>
Updates the value of the signal and notifies subscribers, returning the value that is
returned by the update function, or
None
if the signal has already been disposed.ยงimpl<T> UpdateUntracked for Twhere
T: Write,
impl<T> UpdateUntracked for Twhere
T: Write,
ยงfn try_update_untracked<U>(
&self,
fun: impl FnOnce(&mut <T as UpdateUntracked>::Value) -> U,
) -> Option<U>
fn try_update_untracked<U>( &self, fun: impl FnOnce(&mut <T as UpdateUntracked>::Value) -> U, ) -> Option<U>
Updates the value by applying a function, returning the value returned by that function,
or
None
if the signal has already been disposed.
Does not notify subscribers that the signal has changed.ยงfn update_untracked<U>(&self, fun: impl FnOnce(&mut Self::Value) -> U) -> U
fn update_untracked<U>(&self, fun: impl FnOnce(&mut Self::Value) -> U) -> U
Updates the value by applying a function, returning the value returned by that function.
Does not notify subscribers that the signal has changed. Read more