Struct styled::GlobalSuspenseContext
pub struct GlobalSuspenseContext(_);
Expand description
A single, global suspense context that will be checked when resources are read. This won’t be “blocked” by lower suspense components. This is useful for e.g., holding route transitions.
Implementations§
§impl GlobalSuspenseContext
impl GlobalSuspenseContext
pub fn new(cx: Scope) -> GlobalSuspenseContext
pub fn new(cx: Scope) -> GlobalSuspenseContext
Creates an empty global suspense context.
pub fn with_inner<T>(&self, f: impl FnOnce(&SuspenseContext) -> T) -> T
pub fn with_inner<T>(&self, f: impl FnOnce(&SuspenseContext) -> T) -> T
Runs a function with a reference to the underlying suspense context.
Trait Implementations§
§impl Clone for GlobalSuspenseContext
impl Clone for GlobalSuspenseContext
§fn clone(&self) -> GlobalSuspenseContext
fn clone(&self) -> GlobalSuspenseContext
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for GlobalSuspenseContext
impl !Send for GlobalSuspenseContext
impl !Sync for GlobalSuspenseContext
impl Unpin for GlobalSuspenseContext
impl !UnwindSafe for GlobalSuspenseContext
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