Skip to main content

XmtpMlsLocalContext

Type Alias XmtpMlsLocalContext 

Source
pub type XmtpMlsLocalContext<ApiClient, Db, S> = LocalContext<ApiClient, Db, S, MlsFeatures>;
Expand description

The context of a client, with every feature the client has.

Aliased Type§

pub struct XmtpMlsLocalContext<ApiClient, Db, S> {
Show 25 fields pub identity: Identity, pub api_client: ApiClientWrapper<ApiClient>, pub store: Db, pub mls_storage: S, pub mutexes: MutexRegistry, pub hooks: HookState, pub version_info: VersionInfo, pub server_configuration: ServerConfigurationHandle, pub events: EventBus<InternalEvent>, pub public_event_writer: Arc<dyn EventWriter>, pub registration_event_pending: Arc<Atomic<bool>>, pub delivery_owner: Arc<Mutex<RawMutex, Option<DeliveryOwner>>>, pub retired_delivery_owner: Arc<Mutex<RawMutex, Option<DeliveryOwner>>>, pub scw_verifier: Arc<Box<dyn SmartContractSignatureVerifier>>, pub device_sync: DeviceSync, pub fork_recovery_opts: ForkRecoveryOpts, pub change_callbacks: UnstableChangeCallbacks, pub stream_policy: StreamPolicy, pub worker_config: WorkerConfig, pub worker_metrics: Arc<Mutex<RawMutex, Option<Arc<WorkerMetrics<SyncMetric>>>>>, pub task_channels: TaskWorkerChannels, pub cancellation_token: CancellationToken, pub shutdown_complete: Arc<Atomic<bool>>, pub foreground_calls: Arc<ForegroundCalls>, pub features: MlsFeatures,
}

Fields§

§identity: Identity

XMTP Identity

§api_client: ApiClientWrapper<ApiClient>

The XMTP Api Client

§store: Db

XMTP Local Storage

§mls_storage: S

MLS key and group state storage.

§mutexes: MutexRegistry

Per-key locks shared by the client’s operations.

§hooks: HookState

Test hook state and the wasm send clock.

§version_info: VersionInfo

The client’s version, sent with API requests.

§server_configuration: ServerConfigurationHandle

What this deployment published about itself, resolved once at build plus the blocked connection a refresh may set.

§events: EventBus<InternalEvent>

The internal event bus.

§public_event_writer: Arc<dyn EventWriter>

The writer for events the host reads.

§registration_event_pending: Arc<Atomic<bool>>

Set by a new registration and cleared after its visibility event.

§delivery_owner: Arc<Mutex<RawMutex, Option<DeliveryOwner>>>

The delivery ownership this client holds, if any.

§retired_delivery_owner: Arc<Mutex<RawMutex, Option<DeliveryOwner>>>

A closed reader’s delivery ownership whose release failed, kept until a storage repair releases it. Lock it only while holding delivery_owner.

§scw_verifier: Arc<Box<dyn SmartContractSignatureVerifier>>

Verifies smart contract wallet signatures.

§device_sync: DeviceSync

Device sync settings.

§fork_recovery_opts: ForkRecoveryOpts

Fork recovery settings.

§change_callbacks: UnstableChangeCallbacks

Unstable: SDK-registered notifications for group-state changes. Empty unless the host opted in at build time.

§stream_policy: StreamPolicy

The limits on incoming work; the incoming runtime holds the same policy.

§worker_config: WorkerConfig

Worker settings.

§worker_metrics: Arc<Mutex<RawMutex, Option<Arc<WorkerMetrics<SyncMetric>>>>>

The sync worker’s metrics once it starts.

§task_channels: TaskWorkerChannels

State the task worker shares with inline calls.

§cancellation_token: CancellationToken

Cancelled when shutdown starts.

§shutdown_complete: Arc<Atomic<bool>>

Set once Client::close stops the workers and disconnects the database.

§foreground_calls: Arc<ForegroundCalls>

Counts foreground calls in flight.

§features: MlsFeatures

What the crates above core add.