pub struct GroupCrdtInnerState<ID, OP, C, M>{
pub operations: HashMap<OP, M>,
pub ignore: HashSet<OP>,
pub mutual_removes: HashSet<OP>,
pub states: HashMap<OP, HashMap<ID, GroupMembersState<GroupMember<ID>, C>>>,
pub graph: DiGraphMap<OP, ()>,
}Expand description
Inner state object for GroupCrdt which contains the actual groups state,
including operation graph and membership snapshots.
Fields§
§operations: HashMap<OP, M>All operations processed by this group.
ignore: HashSet<OP>All operations who’s actions should be ignored.
mutual_removes: HashSet<OP>All operations which are part of a mutual remove cycle.
states: HashMap<OP, HashMap<ID, GroupMembersState<GroupMember<ID>, C>>>All resolved states.
graph: DiGraphMap<OP, ()>Operation graph of all auth operations.
Implementations§
Source§impl<ID, OP, C, M> GroupCrdtInnerState<ID, OP, C, M>where
ID: IdentityHandle,
OP: OperationId + Ord,
C: Conditions,
M: Operation<ID, OP, GroupControlMessage<ID, C>>,
impl<ID, OP, C, M> GroupCrdtInnerState<ID, OP, C, M>where
ID: IdentityHandle,
OP: OperationId + Ord,
C: Conditions,
M: Operation<ID, OP, GroupControlMessage<ID, C>>,
Sourcepub fn current_state(
&self,
) -> HashMap<ID, GroupMembersState<GroupMember<ID>, C>>
pub fn current_state( &self, ) -> HashMap<ID, GroupMembersState<GroupMember<ID>, C>>
Current group states.
This method gets the state at all graph tips and then merges them together into one new state which represents the current state of the groups.
Sourcepub fn state_at(
&self,
dependencies: &HashSet<OP>,
) -> Result<HashMap<ID, GroupMembersState<GroupMember<ID>, C>>, GroupCrdtInnerError<OP>>
pub fn state_at( &self, dependencies: &HashSet<OP>, ) -> Result<HashMap<ID, GroupMembersState<GroupMember<ID>, C>>, GroupCrdtInnerError<OP>>
Get the state at a certain point in history.
Trait Implementations§
Source§impl<ID, OP, C: Clone, M: Clone> Clone for GroupCrdtInnerState<ID, OP, C, M>
impl<ID, OP, C: Clone, M: Clone> Clone for GroupCrdtInnerState<ID, OP, C, M>
Source§fn clone(&self) -> GroupCrdtInnerState<ID, OP, C, M>
fn clone(&self) -> GroupCrdtInnerState<ID, OP, C, M>
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, M> Default for GroupCrdtInnerState<ID, OP, C, M>
impl<ID, OP, C, M> Default for GroupCrdtInnerState<ID, OP, C, M>
Source§impl<'de, ID, OP, C, M> Deserialize<'de> for GroupCrdtInnerState<ID, OP, C, M>where
ID: IdentityHandle + Deserialize<'de>,
OP: OperationId + Ord + Deserialize<'de>,
C: Deserialize<'de>,
M: Deserialize<'de>,
impl<'de, ID, OP, C, M> Deserialize<'de> for GroupCrdtInnerState<ID, OP, C, M>where
ID: IdentityHandle + Deserialize<'de>,
OP: OperationId + Ord + Deserialize<'de>,
C: Deserialize<'de>,
M: Deserialize<'de>,
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, M> Serialize for GroupCrdtInnerState<ID, OP, C, M>where
ID: IdentityHandle + Serialize,
OP: OperationId + Ord + Serialize,
C: Serialize,
M: Serialize,
impl<ID, OP, C, M> Serialize for GroupCrdtInnerState<ID, OP, C, M>where
ID: IdentityHandle + Serialize,
OP: OperationId + Ord + Serialize,
C: Serialize,
M: Serialize,
Auto Trait Implementations§
impl<ID, OP, C, M> Freeze for GroupCrdtInnerState<ID, OP, C, M>
impl<ID, OP, C, M> RefUnwindSafe for GroupCrdtInnerState<ID, OP, C, M>
impl<ID, OP, C, M> Send for GroupCrdtInnerState<ID, OP, C, M>
impl<ID, OP, C, M> Sync for GroupCrdtInnerState<ID, OP, C, M>
impl<ID, OP, C, M> Unpin for GroupCrdtInnerState<ID, OP, C, M>
impl<ID, OP, C, M> UnwindSafe for GroupCrdtInnerState<ID, OP, C, M>
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