Trait ron_crdt::crdt::CRDT

source ·
pub trait CRDT {
    type T;

    fn new<'a>(obj: UUID) -> Frame<'a> ;
    fn reduce<'a>(state: Frame<'a>, updates: Vec<Frame<'a>>) -> Option<Frame<'a>>;
    fn map<'a>(state: Frame<'a>) -> Option<Self::T>;
}
Expand description

Operations common to all Conflict-free Replicated Datatypes modeled by RON.

Required Associated Types§

Rust type this CRDT can be mapped to.

Required Methods§

Returns the state Frame of a new, empty CRDT instance with UUID obj.

Reduce state Frame state and update Frames updates to a new state Frame.

Maps the state Frame state to a Rust type.

Implementors§