Struct AsyncDerived
pub struct AsyncDerived<T, S = SyncStorage> {
pub(crate) inner: ArenaItem<ArcAsyncDerived<T>, S>,
}
Expand description
A reactive value that is derived by running an asynchronous computation in response to changes in its sources.
When one of its dependencies changes, this will re-run its async computation, then notify other values that depend on it that it has changed.
This is an arena-allocated type, which is Copy
and is disposed when its reactive
Owner
cleans up. For a reference-counted signal that lives as
as long as a reference to it is alive, see ArcAsyncDerived
.
§Examples
let signal1 = RwSignal::new(0);
let signal2 = RwSignal::new(0);
let derived = AsyncDerived::new(move || async move {
// reactive values can be tracked anywhere in the `async` block
let value1 = signal1.get();
tokio::time::sleep(std::time::Duration::from_millis(25)).await;
let value2 = signal2.get();
value1 + value2
});
// the value can be accessed synchronously as `Option<T>`
assert_eq!(derived.get(), None);
// we can also .await the value, i.e., convert it into a Future
assert_eq!(derived.await, 0);
assert_eq!(derived.get(), Some(0));
signal1.set(1);
// while the new value is still pending, the signal holds the old value
tokio::time::sleep(std::time::Duration::from_millis(5)).await;
assert_eq!(derived.get(), Some(0));
// setting multiple dependencies will hold until the latest change is ready
signal2.set(1);
assert_eq!(derived.await, 2);
§Core Trait Implementations
.get()
clones the current value as anOption<T>
. If you call it within an effect, it will cause that effect to subscribe to the memo, and to re-run whenever the value of the memo changes..get_untracked()
clones the value of without reactively tracking it.
.read()
returns a guard that allows accessing the value by reference. If you call it within an effect, it will cause that effect to subscribe to the memo, and to re-run whenever the value changes..read_untracked()
gives access to the current value without reactively tracking it.
.with()
allows you to reactively access the value without cloning by applying a callback function..with_untracked()
allows you to access the value by applying a callback function without reactively tracking it.
IntoFuture
allows you to create aFuture
that resolves when this resource is done loading.
Fields§
§inner: ArenaItem<ArcAsyncDerived<T>, S>
Implementations§
§impl<T> AsyncDerived<T>where
T: 'static,
impl<T> AsyncDerived<T>where
T: 'static,
pub fn new<Fut>(
fun: impl Fn() -> Fut + Send + Sync + 'static,
) -> AsyncDerived<T>
pub fn new<Fut>( fun: impl Fn() -> Fut + Send + Sync + 'static, ) -> AsyncDerived<T>
Creates a new async derived computation.
This runs eagerly: i.e., calls fun
once when created and immediately spawns the Future
as a new task.
pub fn new_with_initial<Fut>(
initial_value: Option<T>,
fun: impl Fn() -> Fut + Send + Sync + 'static,
) -> AsyncDerived<T>
pub fn new_with_initial<Fut>( initial_value: Option<T>, fun: impl Fn() -> Fut + Send + Sync + 'static, ) -> AsyncDerived<T>
Creates a new async derived computation with an initial value.
If the initial value is Some(_)
, the task will not be run initially.
§impl<T> AsyncDerived<T>
impl<T> AsyncDerived<T>
pub fn new_unsync_threadsafe_storage<Fut>(
fun: impl Fn() -> Fut + 'static,
) -> AsyncDerived<T>where
T: 'static,
Fut: Future<Output = T> + 'static,
pub fn new_unsync_threadsafe_storage<Fut>(
fun: impl Fn() -> Fut + 'static,
) -> AsyncDerived<T>where
T: 'static,
Fut: Future<Output = T> + 'static,
Same as AsyncDerived::new_unsync
except it produces AsyncDerivedsend_wrapper::SendWrapper
].
§impl<T> AsyncDerived<T, LocalStorage>where
T: 'static,
impl<T> AsyncDerived<T, LocalStorage>where
T: 'static,
pub fn new_unsync<Fut>(
fun: impl Fn() -> Fut + 'static,
) -> AsyncDerived<T, LocalStorage>where
T: 'static,
Fut: Future<Output = T> + 'static,
pub fn new_unsync<Fut>(
fun: impl Fn() -> Fut + 'static,
) -> AsyncDerived<T, LocalStorage>where
T: 'static,
Fut: Future<Output = T> + 'static,
Creates a new async derived computation that will be guaranteed to run on the current thread.
This runs eagerly: i.e., calls fun
once when created and immediately spawns the Future
as a new task.
pub fn new_unsync_with_initial<Fut>(
initial_value: Option<T>,
fun: impl Fn() -> Fut + 'static,
) -> AsyncDerived<T, LocalStorage>where
T: 'static,
Fut: Future<Output = T> + 'static,
pub fn new_unsync_with_initial<Fut>(
initial_value: Option<T>,
fun: impl Fn() -> Fut + 'static,
) -> AsyncDerived<T, LocalStorage>where
T: 'static,
Fut: Future<Output = T> + 'static,
Creates a new async derived computation with an initial value. Async work will be guaranteed to run only on the current thread.
If the initial value is Some(_)
, the task will not be run initially.
§impl<T, S> AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
pub fn ready(&self) -> AsyncDerivedReadyFuture ⓘ
pub fn ready(&self) -> AsyncDerivedReadyFuture ⓘ
Returns a Future
that is ready when this resource has next finished loading.
§impl<T, S> AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
pub fn by_ref(&self) -> AsyncDerivedRefFuture<T> ⓘ
pub fn by_ref(&self) -> AsyncDerivedRefFuture<T> ⓘ
Returns a Future
that resolves when the computation is finished, and accesses the inner
value by reference rather than by cloning it.
Trait Implementations§
§impl<T, S> Clone for AsyncDerived<T, S>
impl<T, S> Clone for AsyncDerived<T, S>
§fn clone(&self) -> AsyncDerived<T, S>
fn clone(&self) -> AsyncDerived<T, S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl<T, S> Debug for AsyncDerived<T, S>where
S: Debug,
impl<T, S> Debug for AsyncDerived<T, S>where
S: Debug,
§impl<T, S> DefinedAt for AsyncDerived<T, S>
impl<T, S> DefinedAt for AsyncDerived<T, S>
§fn defined_at(&self) -> Option<&'static Location<'static>>
fn defined_at(&self) -> Option<&'static Location<'static>>
None
in
release mode.§impl<T, S> Dispose for AsyncDerived<T, S>
impl<T, S> Dispose for AsyncDerived<T, S>
§impl<T, S> From<ArcAsyncDerived<T>> for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> From<ArcAsyncDerived<T>> for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn from(value: ArcAsyncDerived<T>) -> AsyncDerived<T, S>
fn from(value: ArcAsyncDerived<T>) -> AsyncDerived<T, S>
§impl<T, S> From<AsyncDerived<T, S>> for ArcAsyncDerived<T>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> From<AsyncDerived<T, S>> for ArcAsyncDerived<T>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn from(value: AsyncDerived<T, S>) -> ArcAsyncDerived<T>
fn from(value: AsyncDerived<T, S>) -> ArcAsyncDerived<T>
§impl<T> FromLocal<ArcAsyncDerived<T>> for AsyncDerived<T, LocalStorage>where
T: 'static,
impl<T> FromLocal<ArcAsyncDerived<T>> for AsyncDerived<T, LocalStorage>where
T: 'static,
§fn from_local(value: ArcAsyncDerived<T>) -> AsyncDerived<T, LocalStorage>
fn from_local(value: ArcAsyncDerived<T>) -> AsyncDerived<T, LocalStorage>
§impl<T, S> IntoFuture for AsyncDerived<T, S>
impl<T, S> IntoFuture for AsyncDerived<T, S>
§type IntoFuture = AsyncDerivedFuture<T>
type IntoFuture = AsyncDerivedFuture<T>
§fn into_future(self) -> <AsyncDerived<T, S> as IntoFuture>::IntoFuture
fn into_future(self) -> <AsyncDerived<T, S> as IntoFuture>::IntoFuture
§impl<T, S> IsDisposed for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> IsDisposed for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn is_disposed(&self) -> bool
fn is_disposed(&self) -> bool
true
, the signal cannot be accessed without a panic.§impl<T, S> Notify for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> Notify for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§impl<T, S> ReactiveNode for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> ReactiveNode for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn mark_dirty(&self)
fn mark_dirty(&self)
§fn mark_check(&self)
fn mark_check(&self)
§fn mark_subscribers_check(&self)
fn mark_subscribers_check(&self)
§fn update_if_necessary(&self) -> bool
fn update_if_necessary(&self) -> bool
§impl<T, S> ReadUntracked for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> ReadUntracked for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§type Value = ReadGuard<Option<T>, Mapped<AsyncPlain<SendOption<T>>, Option<T>>>
type Value = ReadGuard<Option<T>, Mapped<AsyncPlain<SendOption<T>>, Option<T>>>
§fn try_read_untracked(
&self,
) -> Option<<AsyncDerived<T, S> as ReadUntracked>::Value>
fn try_read_untracked( &self, ) -> Option<<AsyncDerived<T, S> as ReadUntracked>::Value>
None
if the signal has already been disposed.§fn read_untracked(&self) -> Self::Value
fn read_untracked(&self) -> Self::Value
§fn custom_try_read(&self) -> Option<Option<Self::Value>>
fn custom_try_read(&self) -> Option<Option<Self::Value>>
Read::try_read
implementation despite it being auto implemented. Read more§impl<T, S> Source for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> Source for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn add_subscriber(&self, subscriber: AnySubscriber)
fn add_subscriber(&self, subscriber: AnySubscriber)
§fn remove_subscriber(&self, subscriber: &AnySubscriber)
fn remove_subscriber(&self, subscriber: &AnySubscriber)
§fn clear_subscribers(&self)
fn clear_subscribers(&self)
§impl<T, S> Subscriber for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> Subscriber for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn add_source(&self, source: AnySource)
fn add_source(&self, source: AnySource)
§fn clear_sources(&self, subscriber: &AnySubscriber)
fn clear_sources(&self, subscriber: &AnySubscriber)
§impl<T, S> ToAnySource for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> ToAnySource for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn to_any_source(&self) -> AnySource
fn to_any_source(&self) -> AnySource
§impl<T, S> ToAnySubscriber for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> ToAnySubscriber for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn to_any_subscriber(&self) -> AnySubscriber
fn to_any_subscriber(&self) -> AnySubscriber
§impl<T, S> Write for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
impl<T, S> Write for AsyncDerived<T, S>where
T: 'static,
S: Storage<ArcAsyncDerived<T>>,
§fn try_write(&self) -> Option<impl UntrackableGuard>
fn try_write(&self) -> Option<impl UntrackableGuard>
None
if the signal has already been disposed.§fn try_write_untracked(&self) -> Option<impl DerefMut>
fn try_write_untracked(&self) -> Option<impl DerefMut>
None
if the signal has already been disposed.§fn write(&self) -> impl UntrackableGuard
fn write(&self) -> impl UntrackableGuard
§fn write_untracked(&self) -> impl DerefMut
fn write_untracked(&self) -> impl DerefMut
impl<T, S> Copy for AsyncDerived<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for AsyncDerived<T, S>
impl<T, S> RefUnwindSafe for AsyncDerived<T, S>
impl<T, S> Send for AsyncDerived<T, S>
impl<T, S> Sync for AsyncDerived<T, S>
impl<T, S> Unpin for AsyncDerived<T, S>
impl<T, S> UnwindSafe for AsyncDerived<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>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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
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
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
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
self
into C
, using the provided parameters.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
§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>
§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>
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>
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)
&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)
&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
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
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
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
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
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
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
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
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self
into T
, while performing the appropriate scaling,
rounding and clamping.§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> Read for Twhere
T: Track + ReadUntracked,
impl<T> Read for Twhere
T: Track + ReadUntracked,
§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
§fn into_taken(self) -> T
fn into_taken(self) -> T
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
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>
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>>
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
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
§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>
(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))
§fn maybe_update(&self, fun: impl FnOnce(&mut Self::Value) -> bool)
fn maybe_update(&self, fun: impl FnOnce(&mut Self::Value) -> bool)
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>
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>
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
§impl<T> With for Twhere
T: Read,
impl<T> With for Twhere
T: Read,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
§impl<T> WithUntracked for Twhere
T: DefinedAt + ReadUntracked,
impl<T> WithUntracked for Twhere
T: DefinedAt + ReadUntracked,
§type Value = <<T as ReadUntracked>::Value as Deref>::Target
type Value = <<T as ReadUntracked>::Value as Deref>::Target
§fn try_with_untracked<U>(
&self,
fun: impl FnOnce(&<T as WithUntracked>::Value) -> U,
) -> Option<U>
fn try_with_untracked<U>( &self, fun: impl FnOnce(&<T as WithUntracked>::Value) -> U, ) -> Option<U>
None
if the signal has already been disposed.