pub enum LoadState<T> {
Pending,
Loading,
Loaded(T),
Failed(String),
}Expand description
The state of a LazyComponent.
Pending— the factory has not been called yet.Loading—prefetch()has been called (or the factory is running synchronously); UI should show a spinner.Loaded(T)— the factory has produced a value;T::clone()returns it.Failed(String)— the factory panicked or returned an error message; UI should show an error state.
Variants§
Pending
The factory has not been called yet.
Loading
The factory is running (set by prefetch()).
Loaded(T)
The factory has produced a value.
Failed(String)
The factory failed; the message is for debugging.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for LoadState<T>where
T: Freeze,
impl<T> RefUnwindSafe for LoadState<T>where
T: RefUnwindSafe,
impl<T> Send for LoadState<T>where
T: Send,
impl<T> Sync for LoadState<T>where
T: Sync,
impl<T> Unpin for LoadState<T>where
T: Unpin,
impl<T> UnsafeUnpin for LoadState<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for LoadState<T>where
T: 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