pub struct NodeMbox { /* private fields */ }Expand description
A data structure to be shared between a receiving thread (e.g. a CAN controller IRQ) and the
Node object.
Incoming messages should be passed to NodeMbox::store_message.
Implementations§
Source§impl NodeMbox
impl NodeMbox
Sourcepub fn set_process_notify_callback(&self, callback: &'static (dyn Fn() + Sync))
pub fn set_process_notify_callback(&self, callback: &'static (dyn Fn() + Sync))
Set a callback for notification when a message is received and requires processing.
It must be static. Usually this will be a static fn, but in some circumstances, it may be desirable to use Box::leak to pass a heap allocated closure instead.
Sourcepub fn store_message(&self, msg: CanMessage) -> Result<(), CanMessage>
pub fn store_message(&self, msg: CanMessage) -> Result<(), CanMessage>
Store a received CAN message
Auto Trait Implementations§
impl !Freeze for NodeMbox
impl !RefUnwindSafe for NodeMbox
impl Send for NodeMbox
impl Sync for NodeMbox
impl Unpin for NodeMbox
impl !UnwindSafe for NodeMbox
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