Skip to main content

NodeState

Trait NodeState 

Source
pub trait NodeState: Send + 'static {
    // Required methods
    fn as_any(&self) -> &(dyn Any + 'static);
    fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
}
Expand description

Trait for node state types

Any type that can be stored as node state must implement this trait. The as_any methods enable type-safe downcasting.

Required Methods§

Source

fn as_any(&self) -> &(dyn Any + 'static)

Get self as Any for downcasting

Source

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Get self as mutable Any for downcasting

Implementors§

Source§

impl<T> NodeState for T
where T: Send + 'static,

Blanket implementation for all types