pub struct CommandEntry {
pub id: &'static str,
pub label: &'static str,
pub category: &'static str,
pub shortcut: Option<&'static str>,
pub command: TuiCommand,
}Expand description
Metadata for a single entry in the command palette.
Used for both display (label, category, shortcut hint) and fuzzy-matching
(id + label are scored by filter_commands).
§Examples
use zeph_tui::command::{command_registry, CommandEntry};
let registry = command_registry();
let quit = registry.iter().find(|e| e.id == "app:quit").unwrap();
assert_eq!(quit.shortcut, Some("q"));Fields§
§id: &'static strStable identifier used in fuzzy search and slash-command routing (e.g. "skill:list").
label: &'static strHuman-readable label shown in the command palette list.
category: &'static strLogical group for categorised display (e.g. "memory", "agent").
shortcut: Option<&'static str>Optional keyboard shortcut hint (e.g. "q", "?").
command: TuiCommandThe TuiCommand dispatched when this entry is selected.
Auto Trait Implementations§
impl Freeze for CommandEntry
impl RefUnwindSafe for CommandEntry
impl Send for CommandEntry
impl Sync for CommandEntry
impl Unpin for CommandEntry
impl UnsafeUnpin for CommandEntry
impl UnwindSafe for CommandEntry
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> 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>
Converts
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>
Converts
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 moreSource§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