p2panda_auth/traits/
resolver.rs1use crate::group::GroupCrdtError;
4use crate::group::{GroupControlMessage, GroupCrdtState};
5use crate::traits::{GroupStore, IdentityHandle, OperationId, Orderer};
6
7pub trait Resolver<ID, OP, C, ORD, GS>
9where
10 ID: IdentityHandle,
11 OP: OperationId + Ord,
12 ORD: Orderer<ID, OP, GroupControlMessage<ID, C>>,
13 GS: GroupStore<ID, OP, C, Self, ORD>,
14 Self: Sized,
15{
16 fn rebuild_required(
19 y: &GroupCrdtState<ID, OP, C, Self, ORD, GS>,
20 msg: &ORD::Operation,
21 ) -> Result<bool, GroupCrdtError<ID, OP, C, Self, ORD, GS>>;
22
23 #[allow(clippy::type_complexity)]
27 fn process(
28 y: GroupCrdtState<ID, OP, C, Self, ORD, GS>,
29 ) -> Result<GroupCrdtState<ID, OP, C, Self, ORD, GS>, GroupCrdtError<ID, OP, C, Self, ORD, GS>>;
30}