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 CStat
impl SubCommand for Clean
impl SubCommand for Clients<UnloadedMode>
impl SubCommand for Clients<Unselected>
impl SubCommand for Counters
impl SubCommand for DBSchema
impl SubCommand for DBVerify
impl SubCommand for Delete
impl SubCommand for EndJournal
Available on non-crate feature
lt2018_1 only.impl SubCommand for Help
Available on non-crate feature
lt2023_2 only.impl SubCommand for History
Available on non-crate feature
lt2019_2 only.impl SubCommand for Journal
impl SubCommand for Patch
Available on non-crate feature
lt2023_2 only.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 SetVariable
impl SubCommand for Show
impl SubCommand for Stop
impl SubCommand for SysInfo
Available on non-crate feature
lt2023_1 only.impl SubCommand for UnSetVariable
impl SubCommand for Where
impl<C: ExclusiveOption> SubCommand for CheckPoint<C>
impl<F: ExclusiveOption, U: ExclusiveOption, C: ExclusiveOption> SubCommand for Clients<RegularMode<F, U, C>>
impl<F: ExclusiveOption, U: ExclusiveOption> SubCommand for Branches<F, U>
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, F, T, W> SubCommand for Client<M, F, T, W>where
M: ClientMode<F, T, W>,
impl<M, O, C, S> SubCommand for Change<M, O, C, S>
impl<M: CloneTarget> SubCommand for Clone<Port, M>
impl<M: ExclusiveOption> SubCommand for BackGroundTask<M>
impl<M: ExclusiveOption> SubCommand for Branch<M>
impl<M: ExclusiveOption> SubCommand for Copy<M>
impl<M: ExclusiveOption> SubCommand for Counter<M>
impl<M: ExclusiveOption> SubCommand for Depot<M>
impl<M: ExclusiveOption> SubCommand for Depots<M>
impl<M: ExclusiveOption> SubCommand for Describe<M>
impl<M: ExclusiveOption> SubCommand for Diagnostics<M>
impl<M: ExclusiveOption> SubCommand for Diff2<M>
impl<M: ExclusiveOption> SubCommand for Diff<M>
impl<M: ExclusiveOption> SubCommand for Dirs<M>
impl<M: ExclusiveOption> SubCommand for DiskSpace<M>
impl<M: ExclusiveOption> SubCommand for Edit<M>
impl<M: ExclusiveOption> SubCommand for Export<M>
impl<M: ExclusiveOption> SubCommand for Print<M>
impl<M: ExclusiveOption> SubCommand for ReplicaFilterReconcile<M>
Available on non-crate feature
lt2025_2 only.