pub struct GroupsProcessor<T, E, L, C = ()> { /* private fields */ }Available on crate feature
processor only.Expand description
Processor for groups operations.
Implementations§
Source§impl<T, E, L, C> GroupsProcessor<T, E, L, C>where
T: Serialize + for<'de> Deserialize<'de>,
E: Extensions + Extension<GroupsArgs<C>> + Extension<L>,
L: LogId,
C: Conditions + Serialize + for<'a> Deserialize<'a>,
impl<T, E, L, C> GroupsProcessor<T, E, L, C>where
T: Serialize + for<'de> Deserialize<'de>,
E: Extensions + Extension<GroupsArgs<C>> + Extension<L>,
L: LogId,
C: Conditions + Serialize + for<'a> Deserialize<'a>,
pub fn new(store: SqliteStore) -> Self
Sourcepub async fn process<SID>(
&self,
id: &SID,
topic: &T,
operation: &Operation<E>,
) -> Result<(), GroupsProcessorError<C>>where
SID: for<'a> Deserialize<'a> + Serialize,
pub async fn process<SID>(
&self,
id: &SID,
topic: &T,
operation: &Operation<E>,
) -> Result<(), GroupsProcessorError<C>>where
SID: for<'a> Deserialize<'a> + Serialize,
Process a groups operation.
Processed operations are first partially ordered, and only processed on the auth groups state if all their dependencies have been met. If other operations become “ready” by this one, then they will be all processed in order.
If an operation which does not contain the required groups extension is processed then it is ignored. Groups messages which are not yet present in the operation store are inserted.
Trait Implementations§
Source§impl<T: Clone, E: Clone, L: Clone, C: Clone> Clone for GroupsProcessor<T, E, L, C>
impl<T: Clone, E: Clone, L: Clone, C: Clone> Clone for GroupsProcessor<T, E, L, C>
Source§fn clone(&self) -> GroupsProcessor<T, E, L, C>
fn clone(&self) -> GroupsProcessor<T, E, L, 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 moreAuto Trait Implementations§
impl<T, E, L, C> Freeze for GroupsProcessor<T, E, L, C>
impl<T, E, L, C = ()> !RefUnwindSafe for GroupsProcessor<T, E, L, C>
impl<T, E, L, C> Send for GroupsProcessor<T, E, L, C>
impl<T, E, L, C> Sync for GroupsProcessor<T, E, L, C>
impl<T, E, L, C> Unpin for GroupsProcessor<T, E, L, C>
impl<T, E, L, C> UnsafeUnpin for GroupsProcessor<T, E, L, C>
impl<T, E, L, C = ()> !UnwindSafe for GroupsProcessor<T, E, L, 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