pub enum Load<T> {
Loading,
Ready(T),
Failed(String),
}Expand description
A resource’s state, from Resource::state.
Variants§
Loading
The first load hasn’t finished.
Ready(T)
The latest finished load succeeded (a newer one may be running: see
Resource::loading).
Failed(String)
The latest finished load failed, with its error’s text.
Trait Implementations§
impl<T: PartialEq> StructuralPartialEq for Load<T>
Auto Trait Implementations§
impl<T> Forget for Load<T>
impl<T> Freeze for Load<T>where
T: Freeze,
impl<T> Move for Load<T>
impl<T> RefUnwindSafe for Load<T>where
T: RefUnwindSafe,
impl<T> Send for Load<T>where
T: Send,
impl<T> Sync for Load<T>where
T: Sync,
impl<T> Unpin for Load<T>where
T: Unpin,
impl<T> UnsafeUnpin for Load<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Load<T>where
T: UnwindSafe,
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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