pub struct AsyncValue<K, T, E>(/* private fields */);Expand description
A declaration of one read. All changing request inputs belong in key.
Loader execution is untracked and uses the supplied local executor. Reads
participate when reached by a boundary, not merely when declared.
Implementations§
Source§impl<K: Clone + PartialEq + 'static, T: 'static, E: Display + 'static> AsyncValue<K, T, E>
impl<K: Clone + PartialEq + 'static, T: 'static, E: Display + 'static> AsyncValue<K, T, E>
pub fn new<F: Future<Output = Result<T, E>> + 'static>( owner: &OwnerHandle, key: impl Fn() -> K + 'static, load: impl Fn(K, CancellationToken) -> F + 'static, spawn: impl Fn(LocalBoxFuture<'static, ()>) + 'static, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<K, T, E> !RefUnwindSafe for AsyncValue<K, T, E>
impl<K, T, E> !Send for AsyncValue<K, T, E>
impl<K, T, E> !Sync for AsyncValue<K, T, E>
impl<K, T, E> !UnwindSafe for AsyncValue<K, T, E>
impl<K, T, E> Freeze for AsyncValue<K, T, E>
impl<K, T, E> Unpin for AsyncValue<K, T, E>
impl<K, T, E> UnsafeUnpin for AsyncValue<K, T, E>where
Rc<Inner<K, T, E>>: UnsafeUnpin,
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