Struct leptos_dom::HydrationCtx
source · pub struct HydrationCtx;
Expand description
Control and utility methods for hydration.
Implementations§
source§impl HydrationCtx
impl HydrationCtx
sourcepub fn peek() -> Option<HydrationKey>
pub fn peek() -> Option<HydrationKey>
If you’re in an hydration context, get the next id
without incrementing it.
sourcepub fn peek_always() -> HydrationKey
pub fn peek_always() -> HydrationKey
Get the next id
without incrementing it.
sourcepub fn id() -> Option<HydrationKey>
pub fn id() -> Option<HydrationKey>
Increments the current hydration id
and returns it
sourcepub fn next_component() -> HydrationKey
pub fn next_component() -> HydrationKey
Resets the hydration id
for the next component, and returns it
sourcepub fn next_outlet() -> HydrationKey
pub fn next_outlet() -> HydrationKey
Resets the hydration id
for the next outlet, and returns it
sourcepub fn next_error() -> HydrationKey
pub fn next_error() -> HydrationKey
Resets the hydration id
for the next component, and returns it
sourcepub fn continue_from(id: HydrationKey)
pub fn continue_from(id: HydrationKey)
Resumes hydration from the provided id
. Useful for
Suspense
and other fancy things.
sourcepub fn continue_after(id: HydrationKey)
pub fn continue_after(id: HydrationKey)
Resumes hydration after the provided id
. Useful for
islands and other fancy things.
sourcepub fn is_hydrating() -> bool
pub fn is_hydrating() -> bool
Whether the UI is currently in the process of hydrating from the server-sent HTML.
Auto Trait Implementations§
impl Freeze for HydrationCtx
impl RefUnwindSafe for HydrationCtx
impl Send for HydrationCtx
impl Sync for HydrationCtx
impl Unpin for HydrationCtx
impl UnwindSafe for HydrationCtx
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