pub enum Resource<T> {
Idle,
Loading,
Ready(T),
Refreshing(T),
Failed {
error: CommandError,
previous: Option<T>,
},
}Expand description
What a query shows. An empty result is Ready with empty data: success,
not failure.
Variants§
Idle
Nothing requested yet.
Loading
First load, no data to show.
Ready(T)
Refreshing(T)
New parameters are loading; the previous data stays visible.
Failed
Fields
§
error: CommandErrorImplementations§
Trait Implementations§
impl<T: PartialEq> StructuralPartialEq for Resource<T>
Auto Trait Implementations§
impl<T> Freeze for Resource<T>
impl<T> RefUnwindSafe for Resource<T>
impl<T> Send for Resource<T>
impl<T> Sync for Resource<T>
impl<T> Unpin for Resource<T>
impl<T> UnsafeUnpin for Resource<T>
impl<T> UnwindSafe for Resource<T>
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