pub struct NodeState { /* private fields */ }Expand description
Runtime state tracked for every ModifierNode.
This type is part of the internal node system API and should not be directly constructed or manipulated by external code. Modifier nodes automatically receive and manage their NodeState through the modifier chain infrastructure.
Implementations§
Source§impl NodeState
impl NodeState
Sourcepub const fn new() -> NodeState
pub const fn new() -> NodeState
Creates the state of a node that is not attached to a chain yet and has no capabilities.
Sourcepub fn set_capabilities(&self, capabilities: NodeCapabilities)
pub fn set_capabilities(&self, capabilities: NodeCapabilities)
Records the capabilities of the node that owns this state. The chain calls it when it adds or updates the node.
Sourcepub fn capabilities(&self) -> NodeCapabilities
pub fn capabilities(&self) -> NodeCapabilities
The capabilities of the node that owns this state.
Sourcepub fn is_attached(&self) -> bool
pub fn is_attached(&self) -> bool
Whether the node is attached to a chain. It is true after on_attach ran and before
on_detach runs.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for NodeState
impl !RefUnwindSafe for NodeState
impl !Sync for NodeState
impl Forget for NodeState
impl Move for NodeState
impl Send for NodeState
impl Unpin for NodeState
impl UnsafeUnpin for NodeState
impl UnwindSafe for NodeState
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more