pub struct GroupCrdtInnerState<ID, OP, M, C>{
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, M, C> GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M, C> GroupCrdtInnerState<ID, OP, M, C>
Sourcepub fn heads_filtered(&self, groups: &[ID]) -> HashSet<OP>
pub fn heads_filtered(&self, groups: &[ID]) -> HashSet<OP>
Get graph tips filtered to only those which included “create” operation for passed group ids in their causal history.
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, M: Clone, C: Clone> Clone for GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M: Clone, C: Clone> Clone for GroupCrdtInnerState<ID, OP, M, C>
Source§fn clone(&self) -> GroupCrdtInnerState<ID, OP, M, C>
fn clone(&self) -> GroupCrdtInnerState<ID, OP, M, C>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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, M, C> Default for GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M, C> Default for GroupCrdtInnerState<ID, OP, M, C>
Source§impl<'de, ID, OP, M, C> Deserialize<'de> for GroupCrdtInnerState<ID, OP, M, C>where
ID: IdentityHandle + Deserialize<'de>,
OP: OperationId + Ord + Deserialize<'de>,
M: Deserialize<'de>,
C: Deserialize<'de>,
impl<'de, ID, OP, M, C> Deserialize<'de> for GroupCrdtInnerState<ID, OP, M, C>where
ID: IdentityHandle + Deserialize<'de>,
OP: OperationId + Ord + Deserialize<'de>,
M: Deserialize<'de>,
C: 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, M, C> Serialize for GroupCrdtInnerState<ID, OP, M, C>where
ID: IdentityHandle + Serialize,
OP: OperationId + Ord + Serialize,
M: Serialize,
C: Serialize,
impl<ID, OP, M, C> Serialize for GroupCrdtInnerState<ID, OP, M, C>where
ID: IdentityHandle + Serialize,
OP: OperationId + Ord + Serialize,
M: Serialize,
C: Serialize,
Auto Trait Implementations§
impl<ID, OP, M, C> Freeze for GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M, C> RefUnwindSafe for GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M, C> Send for GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M, C> Sync for GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M, C> Unpin for GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M, C> UnsafeUnpin for GroupCrdtInnerState<ID, OP, M, C>
impl<ID, OP, M, C> UnwindSafe for GroupCrdtInnerState<ID, OP, M, C>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more