pub struct CommandContext {
pub command_path: Vec<String>,
}Expand description
Context passed to command handlers.
Provides information about the execution environment. Note that output format is deliberately not included here - format decisions are made by the render handler, not by logic handlers.
If handlers need format-aware behavior (e.g., skip expensive formatting for JSON output), the consuming framework can extend this context or pass format information through other means.
Fields§
§command_path: Vec<String>The command path being executed (e.g., [“config”, “get”])
Trait Implementations§
Source§impl Clone for CommandContext
impl Clone for CommandContext
Source§fn clone(&self) -> CommandContext
fn clone(&self) -> CommandContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandContext
impl Debug for CommandContext
Source§impl Default for CommandContext
impl Default for CommandContext
Source§fn default() -> CommandContext
fn default() -> CommandContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommandContext
impl RefUnwindSafe for CommandContext
impl Send for CommandContext
impl Sync for CommandContext
impl Unpin for CommandContext
impl UnwindSafe for CommandContext
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