pub struct ScopeState { /* private fields */ }
Expand description
A component’s rendered state.
This state erases the type of the component’s props. It is used to store the state of a component in the runtime.
Implementations§
source§impl ScopeState
impl ScopeState
sourcepub fn root_node(&self) -> &VNode
pub fn root_node(&self) -> &VNode
Get a handle to the currently active head node arena for this Scope
This is useful for traversing the tree outside of the VirtualDom, such as in a custom renderer or in SSR.
Panics if the tree has not been built yet.
sourcepub fn try_root_node(&self) -> Option<&VNode>
pub fn try_root_node(&self) -> Option<&VNode>
Try to get a handle to the currently active head node arena for this Scope
This is useful for traversing the tree outside of the VirtualDom, such as in a custom renderer or in SSR.
Returns None
if the tree has not been built yet.
sourcepub fn id(&self) -> ScopeId
pub fn id(&self) -> ScopeId
Returns the scope id of this ScopeState
.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ScopeState
impl !RefUnwindSafe for ScopeState
impl !Send for ScopeState
impl !Sync for ScopeState
impl Unpin for ScopeState
impl !UnwindSafe for ScopeState
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.