pub struct ClientBuilder<ApiClient, S, Db = DefaultStore> { /* private fields */ }Implementations§
Source§impl<ApiClient, S, Db> ClientBuilder<ApiClient, S, Db>
impl<ApiClient, S, Db> ClientBuilder<ApiClient, S, Db>
pub fn new(identity_strategy: IdentityStrategy) -> Self
Source§impl<ApiClient, S, Db> ClientBuilder<ApiClient, S, Db>
impl<ApiClient, S, Db> ClientBuilder<ApiClient, S, Db>
Sourcepub fn build_offline(
self,
) -> Result<Client<Arc<XmtpMlsLocalContext<ApiClient, Db, S>>>, ClientBuilderError>
pub fn build_offline( self, ) -> Result<Client<Arc<XmtpMlsLocalContext<ApiClient, Db, S>>>, ClientBuilderError>
build a client in offline mode. returns an error if the client failed to build as offline
pub async fn build( self, ) -> Result<Client<Arc<XmtpMlsLocalContext<ApiClient, Db, S>>>, ClientBuilderError>
pub fn identity(self, identity: Identity) -> Self
Sourcepub fn unstable_change_callbacks(
self,
change_callbacks: UnstableChangeCallbacks,
) -> Self
pub fn unstable_change_callbacks( self, change_callbacks: UnstableChangeCallbacks, ) -> Self
Unstable: register callbacks notified when group state changes.
Registration is construction-time by necessity — the changes these
report arrive from the stream and sync paths, where no SDK call is on
the stack. Passing UnstableChangeCallbacks::default (nothing set)
is equivalent to not calling this at all.
See crate::groups::change_callbacks for the delivery contract.
pub fn store<NewDb>(self, db: NewDb) -> ClientBuilder<ApiClient, S, NewDb>
Sourcepub fn default_mls_store(
self,
) -> Result<ClientBuilder<ApiClient, SqlKeyStore<<Db as XmtpDb>::DbQuery>, Db>, ClientBuilderError>where
Db: XmtpDb,
pub fn default_mls_store(
self,
) -> Result<ClientBuilder<ApiClient, SqlKeyStore<<Db as XmtpDb>::DbQuery>, Db>, ClientBuilderError>where
Db: XmtpDb,
Use the default SQlite MLS Key-Value Store
pub fn mls_storage<NewS>( self, mls_storage: NewS, ) -> ClientBuilder<ApiClient, NewS, Db>
pub fn with_disable_workers(self, disable_workers: bool) -> Self
pub fn with_device_sync_worker_mode(self, mode: Option<DeviceSyncMode>) -> Self
pub fn device_sync_worker_mode(self, mode: DeviceSyncMode) -> Self
pub fn fork_recovery_opts(self, opts: ForkRecoveryOpts) -> Self
Sourcepub fn worker_config(self, cfg: WorkerConfig) -> Self
pub fn worker_config(self, cfg: WorkerConfig) -> Self
Configure background-worker intervals, jitter, and per-worker
enablement. See crate::worker::WorkerConfig.
Sourcepub fn config_provider(self, provider: Arc<dyn ConfigProvider>) -> Self
pub fn config_provider(self, provider: Arc<dyn ConfigProvider>) -> Self
Supply the server configuration instead of reading it (CFG-033).
With a provider in place the client never fetches, stores, refreshes, or checks the deployment identifier. Rust callers only — the bindings do not expose this.
Sourcepub fn api_client<A>(self, api_client: A) -> ClientBuilder<A, S, Db>
pub fn api_client<A>(self, api_client: A) -> ClientBuilder<A, S, Db>
Attach a query-only API client. Receipt uses ordered Query pages.
Standard streaming clients use api_client_with_streams at construction.
Sourcepub fn api_client_with_streams<A>(
self,
api_client: A,
) -> ClientBuilder<A, S, Db>where
A: XmtpMlsBidiStreams + ApiClientIdentity + Clone + Send + Sync + 'static,
A::SubscribeStream: 'static,
pub fn api_client_with_streams<A>(
self,
api_client: A,
) -> ClientBuilder<A, S, Db>where
A: XmtpMlsBidiStreams + ApiClientIdentity + Clone + Send + Sync + 'static,
A::SubscribeStream: 'static,
Attach a native API client with a lazy shared Bidi receiver. No transport task or connection starts until the first receiving interest.
pub fn maybe_version( self, version: Option<VersionInfo>, ) -> ClientBuilder<ApiClient, S, Db>
pub fn version( self, version_info: VersionInfo, ) -> ClientBuilder<ApiClient, S, Db>
Sourcepub fn with_allow_offline(
self,
allow_offline: Option<bool>,
) -> ClientBuilder<ApiClient, S, Db>
pub fn with_allow_offline( self, allow_offline: Option<bool>, ) -> ClientBuilder<ApiClient, S, Db>
Skip network calls when building a client
pub fn enable_api_stats( self, ) -> Result<ClientBuilder<TrackedStatsClient<ApiClient>, S, Db>, ClientBuilderError>
pub fn with_scw_verifier( self, verifier: impl SmartContractSignatureVerifier + 'static, ) -> ClientBuilder<ApiClient, S, Db>
Sourcepub fn with_remote_verifier(
self,
) -> Result<ClientBuilder<ApiClient, S, Db>, ClientBuilderError>
pub fn with_remote_verifier( self, ) -> Result<ClientBuilder<ApiClient, S, Db>, ClientBuilderError>
Build the client with a default remote verifier requires the ‘api’ to be set.
Auto Trait Implementations§
impl<ApiClient, S, Db = EncryptedMessageStore<NativeDb>> !Freeze for ClientBuilder<ApiClient, S, Db>
impl<ApiClient, S, Db = EncryptedMessageStore<NativeDb>> !RefUnwindSafe for ClientBuilder<ApiClient, S, Db>
impl<ApiClient, S, Db> Send for ClientBuilder<ApiClient, S, Db>
impl<ApiClient, S, Db> Sync for ClientBuilder<ApiClient, S, Db>
impl<ApiClient, S, Db> Unpin for ClientBuilder<ApiClient, S, Db>
impl<ApiClient, S, Db> UnsafeUnpin for ClientBuilder<ApiClient, S, Db>
impl<ApiClient, S, Db = EncryptedMessageStore<NativeDb>> !UnwindSafe for ClientBuilder<ApiClient, S, Db>
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
§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> ⓘ
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].§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more