use std::error::Error;
use super::VClock;
pub trait Cvrdt {
type Validation: Error;
fn validate_merge(&self, other: &Self) -> Result<(), Self::Validation>;
fn merge(&mut self, other: Self);
}
pub trait Cmrdt {
type Op;
type Validation: Error;
fn validate_op(&self, op: &Self::Op) -> Result<(), Self::Validation>;
fn apply(&mut self, op: Self::Op);
}
pub trait ResetRemove<A: Ord> {
fn reset_remove(&mut self, clock: &VClock<A>);
}
pub trait ContentEqual {
fn content_equal(&self, other: &Self) -> bool;
}