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 object_flag_sync(&'static self) -> &'static ObjectFlagSync
pub const fn object_flag_sync(&'static self) -> &'static 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(&'static self) -> &'static StorageContext
pub const fn storage_context(&'static self) -> &'static StorageContext
Access the storage_context as a const function
Trait Implementations§
Source§impl NodeStateAccess for NodeState<'_>
impl NodeStateAccess for NodeState<'_>
Source§fn object_flag_sync(&self) -> &ObjectFlagSync
fn object_flag_sync(&self) -> &ObjectFlagSync
Get the PDO flag sync object
Source§fn storage_context(&self) -> &StorageContext
fn storage_context(&self) -> &StorageContext
Get the storage context object
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