pub struct WelcomeService<Context> { /* private fields */ }Expand description
Welcome processing and group sync through the context’s shared incoming coordinator.
Implementations§
Source§impl<Context> WelcomeService<Context>
impl<Context> WelcomeService<Context>
Source§impl<Context> WelcomeService<Context>where
Context: XmtpSharedContext,
impl<Context> WelcomeService<Context>where
Context: XmtpSharedContext,
Sourcepub async fn sync_welcomes(&self) -> Result<Vec<MlsGroup<Context>>, GroupError>
pub async fn sync_welcomes(&self) -> Result<Vec<MlsGroup<Context>>, GroupError>
Process all Welcomes through one fixed replica-visible target.
Sourcepub async fn sync_all_groups(
&self,
groups: Vec<MlsGroup<Context>>,
) -> Result<GroupSyncSummary, GroupError>
pub async fn sync_all_groups( &self, groups: Vec<MlsGroup<Context>>, ) -> Result<GroupSyncSummary, GroupError>
Publish, process fixed targets, and finish required work under one deadline. Every selected group gets an outcome, even when another group fails.
Sourcepub async fn unstick_paused_groups(&self) -> Result<usize, GroupError>
pub async fn unstick_paused_groups(&self) -> Result<usize, GroupError>
Sweep every paused group and clear the pause flag for any
whose paused_for_version is now satisfied by the client’s
pkg_version. Pure local-state operation — no network calls.
Returns the count of groups unstuck. Safe to call on any installation regardless of whether any groups are paused (a no-op on installations with none).
This is the recovery path for the “user upgrades but didn’t
touch a paused group” scenario: without this sweep a paused
group could stay paused indefinitely after the upgrade, since
handle_group_paused (which is the per-group re-evaluator)
only fires when the group is actively synced — and
sync_all_welcomes_and_groups filters out groups with no
new messages on the server.
Sourcepub async fn sync_all_welcomes_and_groups(
&self,
consent_states: Option<Vec<ConsentState>>,
) -> Result<GroupSyncSummary, GroupError>
pub async fn sync_all_welcomes_and_groups( &self, consent_states: Option<Vec<ConsentState>>, ) -> Result<GroupSyncSummary, GroupError>
Sync the initial groups and fixed-target Welcome discoveries under one deadline. Later local groups and above-target Welcomes do not expand this call’s scope.
Trait Implementations§
Source§impl<Context: Clone> Clone for WelcomeService<Context>
impl<Context: Clone> Clone for WelcomeService<Context>
Source§fn clone(&self) -> WelcomeService<Context>
fn clone(&self) -> WelcomeService<Context>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<Context> Freeze for WelcomeService<Context>where
Context: Freeze,
impl<Context> RefUnwindSafe for WelcomeService<Context>where
Context: RefUnwindSafe,
impl<Context> Send for WelcomeService<Context>where
Context: Send,
impl<Context> Sync for WelcomeService<Context>where
Context: Sync,
impl<Context> Unpin for WelcomeService<Context>where
Context: Unpin,
impl<Context> UnsafeUnpin for WelcomeService<Context>where
Context: UnsafeUnpin,
impl<Context> UnwindSafe for WelcomeService<Context>where
Context: UnwindSafe,
Blanket Implementations§
§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read more§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read more§fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].