pub struct StrongRemove<ID, OP, C, M> { /* private fields */ }Expand description
An implementation of Resolver trait which follows strong remove ruleset.
Concurrent operations are identified and processed, any which should be invalidated are added to the operation filter and not applied to the group state. Once an operation has been filtered, any operations which depended on any resulting state will not be applied to group state either. Ruleset for Concurrent Operations
The following ruleset is applied when choosing which operations to “filter” when concurrent operations are processed. It can be assumed that the behavior is equivalent for an admin member being removed, or demoted from admin to a lower access level.
§Strong Remove Concurrency Rules
§Removals
If a removal has occurred, filter any concurrent operations by the removed member, as long as it’s 1) not a predecessor of the remove operation, and 2) not a mutual removal (see below).
§Mutual removals
Mutual removes can occur directly (A removes B, B removes C) or in a cycle (A removes B, B removes C, C removes A), cycles may even include delegations by removed members. The result of all of these cases should be that all members which were part of the cycle should be removed from the group.
§Re-adding member concurrently
If Alice removes Charlie and Bob removes then adds Charlie concurrently, Charlie is removed from the group and all their concurrent actions should be filtered.
§Filtering of transitively dependent operations
When an operation is “explicitly” filtered it may cause dependent operations to become invalid, these operations should not be applied to the group state.
Trait Implementations§
Source§impl<ID: Clone, OP: Clone, C: Clone, M: Clone> Clone for StrongRemove<ID, OP, C, M>
impl<ID: Clone, OP: Clone, C: Clone, M: Clone> Clone for StrongRemove<ID, OP, C, M>
Source§fn clone(&self) -> StrongRemove<ID, OP, C, M>
fn clone(&self) -> StrongRemove<ID, OP, C, M>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<ID: Default, OP: Default, C: Default, M: Default> Default for StrongRemove<ID, OP, C, M>
impl<ID: Default, OP: Default, C: Default, M: Default> Default for StrongRemove<ID, OP, C, M>
Source§fn default() -> StrongRemove<ID, OP, C, M>
fn default() -> StrongRemove<ID, OP, C, M>
Source§impl<ID, OP, C, M> Resolver<ID, OP, C, M> for StrongRemove<ID, OP, C, M>where
ID: IdentityHandle + Ord,
OP: OperationId + Ord,
C: Conditions,
M: Clone + Operation<ID, OP, GroupControlMessage<ID, C>>,
impl<ID, OP, C, M> Resolver<ID, OP, C, M> for StrongRemove<ID, OP, C, M>where
ID: IdentityHandle + Ord,
OP: OperationId + Ord,
C: Conditions,
M: Clone + Operation<ID, OP, GroupControlMessage<ID, C>>,
Source§fn rebuild_required(y: &Self::State, operation: &M) -> Result<bool, Self::Error>
fn rebuild_required(y: &Self::State, operation: &M) -> Result<bool, Self::Error>
Identify if an operation should trigger a group state rebuild.
Source§fn process(y: Self::State) -> Result<Self::State, Self::Error>
fn process(y: Self::State) -> Result<Self::State, Self::Error>
Process the group operation graph, producing a new filter and re-building all state accordingly.