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§
Sourcefn rebuild_required(
y: &GroupCrdtState<ID, OP, C, Self, ORD, GS>,
msg: &ORD::Operation,
) -> Result<bool, GroupCrdtError<ID, OP, C, Self, ORD, GS>>
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.
Sourcefn process(
y: GroupCrdtState<ID, OP, C, Self, ORD, GS>,
) -> Result<GroupCrdtState<ID, OP, C, Self, ORD, GS>, 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>>
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.