Skip to main content

TreeEditor

Trait TreeEditor 

Source
pub trait TreeEditor: TreeModel {
    type Error;

    // Required method
    fn apply(
        &mut self,
        command: TreeEditCommand<Self::Id>,
    ) -> Result<TreeChangeSet<Self::Id>, Self::Error>;
}
Expand description

Applies typed editing commands to a domain model.

Required Associated Types§

Required Methods§

Source

fn apply( &mut self, command: TreeEditCommand<Self::Id>, ) -> Result<TreeChangeSet<Self::Id>, Self::Error>

Applies a command atomically and returns the actual changes.

§Errors

Returns a model-specific error when the command cannot be applied atomically.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§