pub trait CliCompositionLawsExt<This, Commands>where
This: CliCommandsAlg<Commands = Commands> + CliCommandsObserved<Commands = Commands>,
Commands: Clone,{
// Required methods
fn law_cli_identity(&self, commands: &Commands) -> CliLawResult;
fn law_cli_merge_conservation(
&self,
left: &Commands,
right: &Commands,
) -> CliLawResult;
fn law_cli_associativity(
&self,
a: &Commands,
b: &Commands,
c: &Commands,
) -> CliLawResult;
}Expand description
States that command collections form an ordered monoid under merge.
Required Methods§
Sourcefn law_cli_identity(&self, commands: &Commands) -> CliLawResult
fn law_cli_identity(&self, commands: &Commands) -> CliLawResult
Checks that the empty collection describes nothing and is an identity of merge.
Sourcefn law_cli_merge_conservation(
&self,
left: &Commands,
right: &Commands,
) -> CliLawResult
fn law_cli_merge_conservation( &self, left: &Commands, right: &Commands, ) -> CliLawResult
Checks that merge describes left then right, losing and reordering nothing.
Sourcefn law_cli_associativity(
&self,
a: &Commands,
b: &Commands,
c: &Commands,
) -> CliLawResult
fn law_cli_associativity( &self, a: &Commands, b: &Commands, c: &Commands, ) -> CliLawResult
Checks that merge is associative.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<This, Commands> CliCompositionLawsExt<This, Commands> for Thiswhere
This: CliCommandsAlg<Commands = Commands> + CliCommandsObserved<Commands = Commands>,
Commands: Clone,
States that command collections form an ordered monoid under merge.