Resolver

Trait Resolver 

Source
pub trait Resolver<ID, OP, C, ORD, GS>
where ID: IdentityHandle, OP: OperationId + Ord, ORD: Orderer<ID, OP, GroupControlMessage<ID, C>>, GS: GroupStore<ID, OP, C, Self, ORD>, Self: Sized,
{ // Required methods fn rebuild_required( y: &GroupCrdtState<ID, OP, C, Self, ORD, GS>, msg: &ORD::Operation, ) -> Result<bool, GroupCrdtError<ID, OP, C, Self, ORD, GS>>; fn process( y: GroupCrdtState<ID, OP, C, Self, ORD, GS>, ) -> Result<GroupCrdtState<ID, OP, C, Self, ORD, GS>, GroupCrdtError<ID, OP, C, Self, ORD, GS>>; }
Expand description

Interface for implementing a custom group crdt resolver.

Required Methods§

Source

fn rebuild_required( y: &GroupCrdtState<ID, OP, C, Self, ORD, GS>, msg: &ORD::Operation, ) -> Result<bool, GroupCrdtError<ID, OP, C, Self, ORD, GS>>

Check if this message requires that a full state re-build takes place. This would usually be due to concurrent operations arriving which require special handling.

Source

fn process( y: GroupCrdtState<ID, OP, C, Self, ORD, GS>, ) -> Result<GroupCrdtState<ID, OP, C, Self, ORD, GS>, GroupCrdtError<ID, OP, C, Self, ORD, GS>>

Process all operations and update internal state as required.

This could include updating any internal filter object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<ID, OP, C, ORD, GS> Resolver<ID, OP, C, ORD, GS> for StrongRemove<ID, OP, C, ORD, GS>
where ID: IdentityHandle + Display + Ord, OP: OperationId + Display + Ord, C: Clone + Debug + PartialEq + PartialOrd, ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Clone + Debug, ORD::Operation: Clone, ORD::State: Clone, GS: GroupStore<ID, OP, C, Self, ORD> + Debug + Clone,