Skip to main content

CliCompositionLawsExt

Trait CliCompositionLawsExt 

Source
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§

Source

fn law_cli_identity(&self, commands: &Commands) -> CliLawResult

Checks that the empty collection describes nothing and is an identity of merge.

Source

fn law_cli_merge_conservation( &self, left: &Commands, right: &Commands, ) -> CliLawResult

Checks that merge describes left then right, losing and reordering nothing.

Source

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§

Source§

impl<This, Commands> CliCompositionLawsExt<This, Commands> for This
where This: CliCommandsAlg<Commands = Commands> + CliCommandsObserved<Commands = Commands>, Commands: Clone,

States that command collections form an ordered monoid under merge.