pub enum AsyncState<V: View> {
Available(V),
Error(String),
Pending,
}
Expand description
This enum is used in the ready_poll callback to tell the async view whether the view is already available, an error occured, or is still pending.
Variants§
Available(V)
The view of type V
is now available and ready to be owned by the async view
where it will get layouted and drawn instead of the loading animation.
Error(String)
Loading of the view failed with the given error.
Pending
The view is not available yet, try again later.
Auto Trait Implementations§
impl<V> Freeze for AsyncState<V>where
V: Freeze,
impl<V> RefUnwindSafe for AsyncState<V>where
V: RefUnwindSafe,
impl<V> Send for AsyncState<V>
impl<V> Sync for AsyncState<V>
impl<V> Unpin for AsyncState<V>where
V: Unpin,
impl<V> UnwindSafe for AsyncState<V>where
V: 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