pub struct Suspense;
Expand description
A component that specifies the loading indicator when loading lazy descendant components.
For more information, see React documentation about code-splitting.
§Example
Suspense::new()
.fallback(
h!(div[."loading"]).build("Loading…"),
)
.build(
SomeLazyComponent { /* … */ }.build()
)
Implementations§
Trait Implementations§
impl Copy for Suspense
Auto Trait Implementations§
impl Freeze for Suspense
impl RefUnwindSafe for Suspense
impl Send for Suspense
impl Sync for Suspense
impl Unpin for Suspense
impl UnwindSafe for Suspense
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