Struct SuspenseScope
pub struct SuspenseScope {
pub parent: Option<Signal<SuspenseScope>>,
pub sent: Signal<bool>,
/* private fields */
}
Expand description
Represents a new suspense scope. This is created by a call to create_suspense_scope
.
Fields§
§parent: Option<Signal<SuspenseScope>>
The parent suspense scope of the current scope, if it exists.
sent: Signal<bool>
Signal that is set to true
when the view is rendered and streamed into the buffer.
This is unused on the client side.
Implementations§
§impl SuspenseScope
impl SuspenseScope
pub fn new(parent: Option<SuspenseScope>) -> SuspenseScope
pub fn new(parent: Option<SuspenseScope>) -> SuspenseScope
Create a new suspense scope, optionally with a parent scope.
The parent scope should always be located in a reactive scope that is an ancestor of this scope.
pub fn is_loading(self) -> ReadSignal<bool>
pub fn is_loading(self) -> ReadSignal<bool>
Returns a signal representing whether we are currently loading this suspense or not.
Implementation for the use_is_loading
hook.
pub async fn until_finished(self)
pub async fn until_finished(self)
Returns a future that resolves once the scope is no longer loading.
Trait Implementations§
§impl Clone for SuspenseScope
impl Clone for SuspenseScope
§fn clone(&self) -> SuspenseScope
fn clone(&self) -> SuspenseScope
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 more§impl Debug for SuspenseScope
impl Debug for SuspenseScope
impl Copy for SuspenseScope
Auto Trait Implementations§
impl Freeze for SuspenseScope
impl !RefUnwindSafe for SuspenseScope
impl !Send for SuspenseScope
impl !Sync for SuspenseScope
impl Unpin for SuspenseScope
impl !UnwindSafe for SuspenseScope
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)