pub struct NodeState<'a> { /* private fields */ }Expand description
The NodeState provides config-dependent storage to the Node object
The node state has to get instantiated (statically) by zencan-build, based on the device config
via the [NodeStateAccess] trait.
file. It is then provided to the node by the application when it is instantiated, and accessed
Implementations§
Source§impl<'a> NodeState<'a>
impl<'a> NodeState<'a>
Sourcepub const fn new(rpdos: &'a [Pdo<'a>], tpdos: &'a [Pdo<'a>]) -> Self
pub const fn new(rpdos: &'a [Pdo<'a>], tpdos: &'a [Pdo<'a>]) -> Self
Create a new NodeState object
Sourcepub const fn object_flag_sync(&'a self) -> &'a ObjectFlagSync
pub const fn object_flag_sync(&'a self) -> &'a ObjectFlagSync
Access the pdo_sync as a const function
This is required so that it can be shared with the objects in generated code
Sourcepub const fn storage_context(&'a self) -> &'a StorageContext
pub const fn storage_context(&'a self) -> &'a StorageContext
Access the storage_context as a const function
Auto Trait Implementations§
impl<'a> !Freeze for NodeState<'a>
impl<'a> !RefUnwindSafe for NodeState<'a>
impl<'a> Send for NodeState<'a>
impl<'a> Sync for NodeState<'a>
impl<'a> Unpin for NodeState<'a>
impl<'a> !UnwindSafe for NodeState<'a>
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