pub struct AsyncSnapshot<T> {
pub state: ConnectionState,
pub data: Option<T>,
}Expand description
What a component knows of a piece of work that finishes later: where it has got to, and
the last value it gave, if any — the reference’s AsyncSnapshot.
An error is a value like any other: work that can fail gives a Result.
Fields§
§state: ConnectionStateWhere the work has got to.
data: Option<T>The last value it gave: a future’s result once it is done, a stream’s latest.
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for AsyncSnapshot<T>
impl<T: Clone> Clone for AsyncSnapshot<T>
Source§impl<T: Debug> Debug for AsyncSnapshot<T>
impl<T: Debug> Debug for AsyncSnapshot<T>
Source§impl<T: PartialEq> PartialEq for AsyncSnapshot<T>
impl<T: PartialEq> PartialEq for AsyncSnapshot<T>
impl<T: PartialEq> StructuralPartialEq for AsyncSnapshot<T>
Auto Trait Implementations§
impl<T> Freeze for AsyncSnapshot<T>
impl<T> RefUnwindSafe for AsyncSnapshot<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for AsyncSnapshot<T>
impl<T> Sync for AsyncSnapshot<T>
impl<T> Unpin for AsyncSnapshot<T>
impl<T> UnsafeUnpin for AsyncSnapshot<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for AsyncSnapshot<T>where
Option<T>: UnwindSafe,
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