pub enum QueryData<T, E> {
Loading,
Ok(T),
Err(E),
}
Expand description
The data type of a query.
§States
Loading
- No query data is available yetOk
- Query data was successfully fetched and is available. Note this might be stale data, checkQueryStatus
if you need to verify whether the query is currently fetching fresh data.Err
- Query data still wasn’t able to be fetched after the retry strategy was exhausted. This contains the backing error.
Variants§
Loading
No query data is available yet
Ok(T)
Query data was successfully fetched and is available. Note this
might be stale data, check QueryStatus
if you need to verify whether the
query is currently fetching fresh data.
Err(E)
Query data still wasn’t able to be fetched after the retry strategy was exhausted. This contains the backing error.
Trait Implementations§
Auto Trait Implementations§
impl<T, E> Freeze for QueryData<T, E>
impl<T, E> RefUnwindSafe for QueryData<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for QueryData<T, E>
impl<T, E> Sync for QueryData<T, E>
impl<T, E> Unpin for QueryData<T, E>
impl<T, E> UnwindSafe for QueryData<T, E>where
T: UnwindSafe,
E: 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