pub trait SubCommand {
// Required methods
fn name(&self) -> &str;
fn inject_local_args(&self, command: &mut Command);
// Provided methods
fn global_opts(&self) -> Option<&GlobalOpts> { ... }
fn inject_args(&self, command: &mut Command) { ... }
fn setup_command<S: AsRef<OsStr>>(&self, bin: S) -> Command { ... }
}Required Methods§
Provided Methods§
fn global_opts(&self) -> Option<&GlobalOpts>
fn inject_args(&self, command: &mut Command)
fn setup_command<S: AsRef<OsStr>>(&self, bin: S) -> Command
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl SubCommand for Add
impl SubCommand for Aliases
impl SubCommand for EndJournal
Available on non-crate feature
lt2018_1 only.impl SubCommand for Journal
impl SubCommand for ResourceMonitor
Available on non-crate feature
lt2023_1 only.impl SubCommand for Restart
impl SubCommand for SetLdapUsers
Available on non-crate feature
lt2015_1 only.impl SubCommand for Stop
impl SubCommand for SysInfo
Available on non-crate feature
lt2023_1 only.impl SubCommand for Where
impl<C: ExclusiveOption> SubCommand for CheckPoint<C>
impl<F: ExclusiveOption> SubCommand for Annotate<F>
impl<L: ExclusiveOption, H: ExclusiveOption> SubCommand for FileLog<L, H>
impl<L: ExclusiveOption> SubCommand for Changes<L>
impl<M: ExclusiveOption> SubCommand for Describe<M>
impl<M: ExclusiveOption> SubCommand for Edit<M>
impl<M: ExclusiveOption> SubCommand for Print<M>
impl<M: ExclusiveOption> SubCommand for ReplicaFilterReconcile<M>
Available on non-crate feature
lt2025_2 only.