pub enum SuspensePhase<T> {
Pending,
Resolved(T),
Failed(String),
}Expand description
The phase of a SuspenseState.
Pending— the underlying data is still loading. Render a fallback / spinner.Resolved(T)— the data has loaded. Render the loaded content.Failed(String)— the data load failed with the given message. Render an error boundary.
Variants§
Pending
The data is still loading.
Resolved(T)
The data has loaded.
Failed(String)
The data load failed; the message is for debugging.
Trait Implementations§
Source§impl<T: Clone> Clone for SuspensePhase<T>
impl<T: Clone> Clone for SuspensePhase<T>
Source§fn clone(&self) -> SuspensePhase<T>
fn clone(&self) -> SuspensePhase<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for SuspensePhase<T>
impl<T: Debug> Debug for SuspensePhase<T>
Source§impl<T> Default for SuspensePhase<T>
impl<T> Default for SuspensePhase<T>
Source§fn default() -> SuspensePhase<T>
fn default() -> SuspensePhase<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for SuspensePhase<T>where
T: Freeze,
impl<T> RefUnwindSafe for SuspensePhase<T>where
T: RefUnwindSafe,
impl<T> Send for SuspensePhase<T>where
T: Send,
impl<T> Sync for SuspensePhase<T>where
T: Sync,
impl<T> Unpin for SuspensePhase<T>where
T: Unpin,
impl<T> UnsafeUnpin for SuspensePhase<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SuspensePhase<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