pub struct UseFuture<T> { /* private fields */ }Implementations§
§impl<T> UseFuture<T>
impl<T> UseFuture<T>
pub fn restart(&self)
pub fn restart(&self)
Restart the future with new dependencies.
Will not cancel the previous future, but will ignore any values that it generates.
pub fn cancel(&self, cx: &ScopeState)
pub fn cancel(&self, cx: &ScopeState)
Forcefully cancel a future
pub fn clear(&self) -> Option<T>
pub fn set(&self, _new_value: T)
pub fn value(&self) -> Option<&T>
pub fn value(&self) -> Option<&T>
Return any value, even old values if the future has not yet resolved.
If the future has never completed, the returned value will be None.
pub fn state(&self) -> UseFutureState<'_, T>
pub fn state(&self) -> UseFutureState<'_, T>
Get the current state of the future.
Trait Implementations§
§impl<'a, T> IntoFuture for &'a UseFuture<T>
impl<'a, T> IntoFuture for &'a UseFuture<T>
§type IntoFuture = UseFutureAwait<'a, T>
type IntoFuture = UseFutureAwait<'a, T>
Which kind of future are we turning this into?
§fn into_future(self) -> <&'a UseFuture<T> as IntoFuture>::IntoFuture
fn into_future(self) -> <&'a UseFuture<T> as IntoFuture>::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<T> !RefUnwindSafe for UseFuture<T>
impl<T> !Send for UseFuture<T>
impl<T> !Sync for UseFuture<T>
impl<T> Unpin for UseFuture<T>
impl<T> !UnwindSafe for UseFuture<T>
Blanket Implementations§
§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.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§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