pub struct ModeRef<'a> { /* private fields */ }Expand description
A handle that allows calling mode methods without keeping the registry read lock held across callback execution.
Implementations§
Source§impl<'a> ModeRef<'a>
impl<'a> ModeRef<'a>
pub fn on_session_start( &self, session: &Session, env: &Envelope, ) -> Result<ModeResponse, MacpError>
pub fn on_message( &self, session: &Session, env: &Envelope, ) -> Result<ModeResponse, MacpError>
Sourcepub fn on_message_at(
&self,
session: &Session,
env: &Envelope,
ctx: &MessageContext,
) -> Result<ModeResponse, MacpError>
pub fn on_message_at( &self, session: &Session, env: &Envelope, ctx: &MessageContext, ) -> Result<ModeResponse, MacpError>
Kernel entry point: on_message with the runtime’s acceptance-clock
context. The runtime and replay call this so modes that need a
trustworthy time source receive the log-recorded clock.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ModeRef<'a>
impl<'a> !UnwindSafe for ModeRef<'a>
impl<'a> Freeze for ModeRef<'a>
impl<'a> Send for ModeRef<'a>
impl<'a> Sync for ModeRef<'a>
impl<'a> Unpin for ModeRef<'a>
impl<'a> UnsafeUnpin for ModeRef<'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