Skip to main content

DispatchOutput

Struct DispatchOutput 

Source
pub struct DispatchOutput {
Show 13 fields pub lines: Vec<OutputLine>, pub replay_lines: Vec<ReplayLine>, pub mode_change: Option<ModeTarget>, pub show_overlay: Option<OverlayTarget>, pub quit: bool, pub clear_log: bool, pub risk: Option<RiskDirection>, pub friction: Option<FrictionDecision>, pub pending_command: Option<Command>, pub verbose_toggle: Option<bool>, pub wrap_off_toggle: Option<bool>, pub coaching_reset: bool, pub dismiss_overlay: bool,
}
Expand description

What the dispatcher produced. Mode changes and quits are separate side-channel effects so the caller can apply them without string-parsing lines back.

Fields§

§lines: Vec<OutputLine>§replay_lines: Vec<ReplayLine>

Replayed log rows the TUI should append without persisting. Empty for every command except /resume, where the dispatcher emits one entry per event from the prior session’s event log. Kept as a separate field (rather than an OutputLine::Replayed variant) so the routing rule “replay = silent, lines = recorded” is enforced at the type level — a future contributor cannot accidentally flip a normal line into silent mode or vice versa.

§mode_change: Option<ModeTarget>§show_overlay: Option<OverlayTarget>

Open a modal overlay on top of the current mode. The dispatcher only signals intent; the TUI resolves presentation + dismissal keybinds.

§quit: bool§clear_log: bool§risk: Option<RiskDirection>§friction: Option<FrictionDecision>

Friction decision applied to the command. Always present when risk is. Proceed means “the command was run immediately”; Pause / TypedConfirm means “the command was not run — the caller must honor the friction before re-dispatching.” That split is why Decision is emitted as data rather than baked into the line output.

§pending_command: Option<Command>

Carries the resolved Command when DispatchOutput::friction is Pause or TypedConfirm, so the caller (TUI) can open a friction overlay and, after the pause elapses and any typed confirmation lands, re-run the command with run_bypass_friction. None for Proceed (the command already ran) and for commands without a risk direction.

§verbose_toggle: Option<bool>

Verbose-mode intent emitted by /verbose. None means “leave it alone.” A Some(new_state) carries the target boolean the TUI should swing to — the dispatcher resolves Toggle against [DispatchContext::verbose_snapshot] so the TUI is free of the toggle semantics and every downstream caller sees an absolute state, not an instruction.

§wrap_off_toggle: Option<bool>

Wrap-off intent emitted by /wrap-off. Some(true) means “skip wrap on the next /quit / session end for this session only” — the flag never persists across sessions (per ADDENDUM_A §9.1). None means the command did not touch the flag.

§coaching_reset: bool

Coaching-reset intent emitted by /coaching reset. true means the TUI should empty its coaching buffer. Kept as a boolean (not an Option<()>) so the default value is immediately legible.

§dismiss_overlay: bool

Dismiss any active modal overlay. Used by commands whose “purpose” is to clear operator context (/clear) or by failure paths in commands that might otherwise leave a stale overlay floating (e.g. /evaluate <coin> when the engine returns an empty body — we emit an alert line and signal dismissal so the operator is not left staring at an older, unrelated verdict card). Ignored when DispatchOutput::show_overlay is Some — opening and closing in the same tick would be contradictory, and show_overlay wins because the data path is the reason the command ran.

Implementations§

Trait Implementations§

Source§

impl Clone for DispatchOutput

Source§

fn clone(&self) -> DispatchOutput

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DispatchOutput

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DispatchOutput

Source§

fn default() -> DispatchOutput

Returns the “default value” for a type. Read more
Source§

impl PartialEq for DispatchOutput

Source§

fn eq(&self, other: &DispatchOutput) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for DispatchOutput

Source§

impl StructuralPartialEq for DispatchOutput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more