Skip to main content

CliCommandsAlg

Trait CliCommandsAlg 

Source
pub trait CliCommandsAlg {
    type Commands;

    // Required methods
    fn cli_empty(&self) -> Self::Commands;
    fn cli_merge(
        &self,
        left: Self::Commands,
        right: Self::Commands,
    ) -> Self::Commands;
}
Expand description

Describes construction and composition of command collections.

Merge keeps declaration order and repetitions; which repetition wins is the interpreter’s policy.

Required Associated Types§

Source

type Commands

The interpreter’s homogeneous command collection.

Required Methods§

Source

fn cli_empty(&self) -> Self::Commands

Returns the empty command collection.

Source

fn cli_merge( &self, left: Self::Commands, right: Self::Commands, ) -> Self::Commands

Combines two command collections, left first.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§