pub struct HandoffMode { /* private fields */ }Implementations§
Source§impl HandoffMode
impl HandoffMode
Sourcepub fn new(evaluator: Arc<dyn PolicyEvaluator>) -> Self
pub fn new(evaluator: Arc<dyn PolicyEvaluator>) -> Self
Construct the mode with an injected governance policy evaluator.
Trait Implementations§
Source§impl Mode for HandoffMode
impl Mode for HandoffMode
Authorize the sender for this message. Modes can override to customize
authorization (e.g., allowing orchestrator bypass for Commitment messages).
fn on_session_start( &self, session: &Session, _env: &Envelope, ) -> Result<ModeResponse, MacpError>
fn on_message( &self, session: &Session, env: &Envelope, ) -> Result<ModeResponse, MacpError>
Source§fn on_message_at(
&self,
session: &Session,
env: &Envelope,
ctx: &MessageContext,
) -> Result<ModeResponse, MacpError>
fn on_message_at( &self, session: &Session, env: &Envelope, ctx: &MessageContext, ) -> Result<ModeResponse, MacpError>
Kernel entry point:
on_message plus the runtime’s
[MessageContext] (acceptance clock). Defaulted to plain
on_message so most modes ignore it; modes that need a trustworthy
time source (Handoff) override this instead of reading the forgeable
Envelope.timestamp_unix_ms. The runtime and replay always call this,
with the same clock value that the log entry records.Auto Trait Implementations§
impl !RefUnwindSafe for HandoffMode
impl !UnwindSafe for HandoffMode
impl Freeze for HandoffMode
impl Send for HandoffMode
impl Sync for HandoffMode
impl Unpin for HandoffMode
impl UnsafeUnpin for HandoffMode
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