Skip to main content

NodeState

Trait NodeState 

Source
pub trait NodeState: Send + 'static {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
}
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

Get self as Any for downcasting

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Get self as mutable Any for downcasting

Implementors§

Source§

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

Blanket implementation for all types