pub struct ControlMessage {
pub command: InterventionCommand,
pub ack: Option<Sender<InterventionOutcome>>,
}Expand description
One routed intervention on the driver’s control channel: the neutral command
plus an OPTIONAL reply channel the driver answers with the neutral
InterventionOutcome ack.
The ack is what closes the loop back to the operator (NOI-6 §6.4): after the
driver calls AgentSession::intervene it maps the session’s result onto an
InterventionOutcome and, when an ack sender is present, replies with it.
A None ack is the fire-and-forget shape (used where no operator is waiting,
e.g. an internal test that only observes the applied side-effect).
Fields§
§command: InterventionCommandThe neutral command to apply to the session.
ack: Option<Sender<InterventionOutcome>>Optional reply channel the driver answers with the applied/gated/stale ack.
Implementations§
Source§impl ControlMessage
impl ControlMessage
Sourcepub const fn new(command: InterventionCommand) -> Self
pub const fn new(command: InterventionCommand) -> Self
A fire-and-forget control message with no ack reply channel.
Sourcepub const fn with_ack(
command: InterventionCommand,
ack: Sender<InterventionOutcome>,
) -> Self
pub const fn with_ack( command: InterventionCommand, ack: Sender<InterventionOutcome>, ) -> Self
A control message paired with a reply channel for its ack.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ControlMessage
impl !UnwindSafe for ControlMessage
impl Freeze for ControlMessage
impl Send for ControlMessage
impl Sync for ControlMessage
impl Unpin for ControlMessage
impl UnsafeUnpin for ControlMessage
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
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>
T in a tonic::Request