pub struct CommandDescriptor {
pub name: String,
pub summary: String,
pub routing: CommandRouting,
pub args_hint: Option<String>,
}Expand description
One entry in an engine-supplied slash-command registry.
Why: DOC-50 §5 Slice 7 / Q4 splits slash commands into client-side
built-ins (/help, /clear, /quit, handled entirely inside
trusty-code-tui, never reaching TuiEngine::handle_input) and
engine-routed domain commands (/model, /workstream, forwarded to
TuiEngine::handle_input). /help needs to enumerate both, so
CommandRouting records which side owns dispatch — generalizing
tagent’s flat SLASH_COMMANDS: &[(&str, &str)] array
(crates/trusty-agents/src/repl/tui/helpers.rs:156-181), which mixes
generic commands (/help, /clear) with tagent-specific ones
(/agent, /local, /tm) and carries no routing information at all.
What: name is the command without its leading / (e.g.
"workstream"); summary is the one-line help text /help renders;
args_hint is optional completion metadata shown after the name (e.g.
Some("<id>") renders as /workstream activate <id> in autocomplete),
mirroring tagent’s update_slash_completions prefix-match behavior
without hardcoding argument shapes into the shared crate.
Fields§
§name: String§summary: String§routing: CommandRouting§args_hint: Option<String>Trait Implementations§
Source§impl Clone for CommandDescriptor
impl Clone for CommandDescriptor
Source§impl Debug for CommandDescriptor
impl Debug for CommandDescriptor
Source§impl<'de> Deserialize<'de> for CommandDescriptor
impl<'de> Deserialize<'de> for CommandDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CommandDescriptor
Source§impl PartialEq for CommandDescriptor
impl PartialEq for CommandDescriptor
Source§impl Serialize for CommandDescriptor
impl Serialize for CommandDescriptor
impl StructuralPartialEq for CommandDescriptor
Auto Trait Implementations§
impl Forget for CommandDescriptor
impl Freeze for CommandDescriptor
impl Move for CommandDescriptor
impl RefUnwindSafe for CommandDescriptor
impl Send for CommandDescriptor
impl Sync for CommandDescriptor
impl Unpin for CommandDescriptor
impl UnsafeUnpin for CommandDescriptor
impl UnwindSafe for CommandDescriptor
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more