pub trait OpHeadsStore: Send + Sync + Debug {
    // Required methods
    fn name(&self) -> &str;
    fn add_op_head(&self, id: &OperationId);
    fn remove_op_head(&self, id: &OperationId);
    fn get_op_heads(&self) -> Vec<OperationId>;
    fn lock<'a>(&'a self) -> Box<dyn OpHeadsStoreLock<'a> + 'a>;

    // Provided method
    fn handle_ancestor_ops(&self, op_heads: Vec<Operation>) -> Vec<Operation> { ... }
}
Expand description

Manages the set of current heads of the operation log.

Required Methods§

source

fn name(&self) -> &str

source

fn add_op_head(&self, id: &OperationId)

source

fn remove_op_head(&self, id: &OperationId)

source

fn get_op_heads(&self) -> Vec<OperationId>

source

fn lock<'a>(&'a self) -> Box<dyn OpHeadsStoreLock<'a> + 'a>

Provided Methods§

source

fn handle_ancestor_ops(&self, op_heads: Vec<Operation>) -> Vec<Operation>

Removes operations in the input that are ancestors of other operations in the input. The ancestors are removed both from the list and from storage.

Implementors§