pub struct CommandContext {
pub(crate) app: AppContext,
pub(crate) ui: UiSettings,
}Fields§
§app: AppContext§ui: UiSettingsImplementations§
Source§impl CommandContext
impl CommandContext
Sourcepub fn from_config(config: &Config) -> Result<Self>
pub fn from_config(config: &Config) -> Result<Self>
Build a command context from a loaded configuration.
Sourcepub fn from_config_with_verbosity(
config: &Config,
verbosity: u8,
) -> Result<Self>
pub fn from_config_with_verbosity( config: &Config, verbosity: u8, ) -> Result<Self>
Build a command context with an explicit verbosity level.
Sourcepub fn app(&self) -> &AppContext
pub fn app(&self) -> &AppContext
Return the application context used by the command handlers.
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 moreAuto 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