pub struct CommandContext { /* private fields */ }Implementations§
Source§impl CommandContext
impl CommandContext
Sourcepub fn from_cli(cli: &Cli) -> Result<Self, CliError>
pub fn from_cli(cli: &Cli) -> Result<Self, CliError>
Constructs a command context from parsed CLI arguments.
This constructor is fallible: it returns a usage error when --version
is combined with a subcommand or when neither a subcommand nor
--version was provided.
pub fn command_id(&self) -> &str
pub fn service_name(&self) -> &str
pub const fn summary(&self) -> &'static str
Sourcepub const fn skips_logging(&self) -> bool
pub const fn skips_logging(&self) -> bool
Standalone consumer probes must never initialize repository logging.
pub fn dispatch_tool(&self) -> Option<&'static str>
pub fn adapter_kind(&self) -> Option<&'static str>
pub fn adapter_config_scope(&self) -> Option<&'static str>
pub fn adapter_script(&self) -> Option<&'static str>
pub const fn is_xwin_preflight(&self) -> bool
Trait Implementations§
Source§impl Clone for CommandContext
impl Clone for CommandContext
Source§impl Debug for CommandContext
impl Debug for CommandContext
impl Eq for CommandContext
Source§impl PartialEq for CommandContext
impl PartialEq for CommandContext
impl StructuralPartialEq for CommandContext
Auto Trait Implementations§
impl Forget for CommandContext
impl Freeze for CommandContext
impl Move for CommandContext
impl RefUnwindSafe for CommandContext
impl Send for CommandContext
impl Sync for CommandContext
impl Unpin for CommandContext
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.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 more