pub struct GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle,
OP: OperationId + Ord,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug,
ORD::Operation: Clone,{
pub inner: GroupCrdtInnerState<ID, OP, C, ORD::Operation>,
pub orderer_y: ORD::State,
}Expand description
State object for GroupCrdt containing an orderer state and the inner
state.
Fields§
§inner: GroupCrdtInnerState<ID, OP, C, ORD::Operation>Inner groups state.
orderer_y: ORD::StateState for the orderer.
Implementations§
Source§impl<ID, OP, C, ORD> GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle,
OP: OperationId + Ord,
C: Conditions,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug,
ORD::Operation: Clone,
impl<ID, OP, C, ORD> GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle,
OP: OperationId + Ord,
C: Conditions,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug,
ORD::Operation: Clone,
Sourcepub fn root_members(&self, group_id: ID) -> Vec<(GroupMember<ID>, Access<C>)>
pub fn root_members(&self, group_id: ID) -> Vec<(GroupMember<ID>, Access<C>)>
Get all direct members of a group.
This method does not recurse into sub-groups, but rather returns only the direct group members and their access levels.
Source§impl<ID, OP, C, ORD> GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + Ord + Display,
OP: OperationId + Ord + Display,
C: Conditions,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Clone + Debug,
ORD::State: Clone,
ORD::Operation: Clone,
impl<ID, OP, C, ORD> GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + Ord + Display,
OP: OperationId + Ord + Display,
C: Conditions,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Clone + Debug,
ORD::State: Clone,
ORD::Operation: Clone,
Trait Implementations§
Source§impl<ID, OP, C: Clone, ORD> Clone for GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + Clone,
OP: OperationId + Ord + Clone,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug + Clone,
ORD::Operation: Clone + Clone,
ORD::State: Clone,
impl<ID, OP, C: Clone, ORD> Clone for GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + Clone,
OP: OperationId + Ord + Clone,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug + Clone,
ORD::Operation: Clone + Clone,
ORD::State: Clone,
Source§fn clone(&self) -> GroupCrdtState<ID, OP, C, ORD>
fn clone(&self) -> GroupCrdtState<ID, OP, C, ORD>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<ID, OP, C: Debug, ORD> Debug for GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + Debug,
OP: OperationId + Ord + Debug,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug + Debug,
ORD::Operation: Clone + Debug,
ORD::State: Debug,
impl<ID, OP, C: Debug, ORD> Debug for GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + Debug,
OP: OperationId + Ord + Debug,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug + Debug,
ORD::Operation: Clone + Debug,
ORD::State: Debug,
Source§impl<'de, ID, OP, C, ORD> Deserialize<'de> for GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + DeserializeOwned + Serialize,
OP: OperationId + Ord + DeserializeOwned + Serialize,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug,
ORD::Operation: Clone + DeserializeOwned + Serialize,
C: DeserializeOwned + Serialize,
ORD::State: DeserializeOwned + Serialize,
impl<'de, ID, OP, C, ORD> Deserialize<'de> for GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + DeserializeOwned + Serialize,
OP: OperationId + Ord + DeserializeOwned + Serialize,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug,
ORD::Operation: Clone + DeserializeOwned + Serialize,
C: DeserializeOwned + Serialize,
ORD::State: DeserializeOwned + Serialize,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<ID, OP, C, ORD> Serialize for GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + DeserializeOwned + Serialize,
OP: OperationId + Ord + DeserializeOwned + Serialize,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug,
ORD::Operation: Clone + DeserializeOwned + Serialize,
C: DeserializeOwned + Serialize,
ORD::State: DeserializeOwned + Serialize,
impl<ID, OP, C, ORD> Serialize for GroupCrdtState<ID, OP, C, ORD>where
ID: IdentityHandle + DeserializeOwned + Serialize,
OP: OperationId + Ord + DeserializeOwned + Serialize,
ORD: Orderer<ID, OP, GroupControlMessage<ID, C>> + Debug,
ORD::Operation: Clone + DeserializeOwned + Serialize,
C: DeserializeOwned + Serialize,
ORD::State: DeserializeOwned + Serialize,
Auto Trait Implementations§
impl<ID, OP, C, ORD> Freeze for GroupCrdtState<ID, OP, C, ORD>where
<ORD as Orderer<ID, OP, GroupControlMessage<ID, C>>>::Operation: Sized,
<ORD as Orderer<ID, OP, GroupControlMessage<ID, C>>>::State: Freeze,
impl<ID, OP, C, ORD> RefUnwindSafe for GroupCrdtState<ID, OP, C, ORD>where
<ORD as Orderer<ID, OP, GroupControlMessage<ID, C>>>::Operation: Sized + RefUnwindSafe,
<ORD as Orderer<ID, OP, GroupControlMessage<ID, C>>>::State: RefUnwindSafe,
OP: RefUnwindSafe,
ID: RefUnwindSafe,
C: RefUnwindSafe,
impl<ID, OP, C, ORD> Send for GroupCrdtState<ID, OP, C, ORD>
impl<ID, OP, C, ORD> Sync for GroupCrdtState<ID, OP, C, ORD>
impl<ID, OP, C, ORD> Unpin for GroupCrdtState<ID, OP, C, ORD>
impl<ID, OP, C, ORD> UnsafeUnpin for GroupCrdtState<ID, OP, C, ORD>where
<ORD as Orderer<ID, OP, GroupControlMessage<ID, C>>>::Operation: Sized,
<ORD as Orderer<ID, OP, GroupControlMessage<ID, C>>>::State: UnsafeUnpin,
impl<ID, OP, C, ORD> UnwindSafe for GroupCrdtState<ID, OP, C, ORD>where
<ORD as Orderer<ID, OP, GroupControlMessage<ID, C>>>::Operation: Sized + UnwindSafe,
<ORD as Orderer<ID, OP, GroupControlMessage<ID, C>>>::State: UnwindSafe,
OP: UnwindSafe,
ID: UnwindSafe,
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more