pub struct CommandInfo {
pub id: String,
pub label: String,
pub menu: Vec<String>,
pub shortcut: Option<String>,
pub params_schema: Value,
pub params_text: Option<String>,
pub enabled: bool,
pub disabled_reason: Option<String>,
pub mutates: bool,
}Expand description
CONTRACT: what discovery returns for one command (palette, menus, MCP tools, CLI commands).
Fields§
§id: String§label: StringMenu path, e.g. ["File", "Export"]. Empty = not in menus.
shortcut: Option<String>Portable shortcut, Mod+Shift+S (Mod = ⌘ on macOS, Ctrl elsewhere).
params_schema: ValueJSON Schema ({"type":"object","properties":…}) for the parameters.
params_text: Option<String>Free-text parameter description when the command is not typed yet.
enabled: bool§disabled_reason: Option<String>§mutates: boolChanges the document (journaled, undoable) vs a pure query / view command.
Trait Implementations§
Source§impl Clone for CommandInfo
impl Clone for CommandInfo
Source§impl Debug for CommandInfo
impl Debug for CommandInfo
Source§impl<'de> Deserialize<'de> for CommandInfo
impl<'de> Deserialize<'de> for CommandInfo
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CommandInfo
impl PartialEq for CommandInfo
Source§impl Serialize for CommandInfo
impl Serialize for CommandInfo
impl StructuralPartialEq for CommandInfo
Auto Trait Implementations§
impl Freeze for CommandInfo
impl RefUnwindSafe for CommandInfo
impl Send for CommandInfo
impl Sync for CommandInfo
impl Unpin for CommandInfo
impl UnsafeUnpin for CommandInfo
impl UnwindSafe for CommandInfo
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