pub enum ResourceState<K, T, E> {
Idle,
Loading {
key: K,
previous: Option<Data<K, T>>,
},
Ready(Data<K, T>),
Error {
key: K,
error: Rc<E>,
previous: Option<Data<K, T>>,
},
Disposed,
}Expand description
Previous data is explicitly labelled; it is never passed off as a new key’s result.
Variants§
Implementations§
Source§impl<K, T, E> ResourceState<K, T, E>
impl<K, T, E> ResourceState<K, T, E>
Trait Implementations§
Source§impl<K, T, E> Clone for ResourceState<K, T, E>where
K: Clone,
impl<K, T, E> Clone for ResourceState<K, T, E>where
K: Clone,
Auto Trait Implementations§
impl<K, T, E> !Send for ResourceState<K, T, E>
impl<K, T, E> !Sync for ResourceState<K, T, E>
impl<K, T, E> Freeze for ResourceState<K, T, E>
impl<K, T, E> RefUnwindSafe for ResourceState<K, T, E>where
K: RefUnwindSafe,
Option<Data<K, T>>: RefUnwindSafe,
Data<K, T>: RefUnwindSafe,
Rc<E>: RefUnwindSafe,
impl<K, T, E> Unpin for ResourceState<K, T, E>
impl<K, T, E> UnsafeUnpin for ResourceState<K, T, E>
impl<K, T, E> UnwindSafe for ResourceState<K, T, E>
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