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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request