pub trait XmtpMlsBidiStreams: MaybeSend + MaybeSync {
type SubscribeStream: Stream<Item = Result<SubscribeResponse, Self::Error>> + MaybeSend;
type Error: RetryableError + 'static;
// Required methods
fn host(&self) -> &str;
fn subscribe_bidi<'life0, 'async_trait>(
&'life0 self,
requests: Pin<Box<dyn Stream<Item = SubscribeRequest> + Send>>,
) -> Pin<Box<dyn Future<Output = Result<Self::SubscribeStream, Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn bidi_limits(&self) -> Arc<LimitsConfiguration> ⓘ { ... }
}Expand description
The XIP-83 bidirectional subscription: one long-lived stream carrying
group and welcome messages, mutated in place (no reconnect on membership
change) and kept alive with WebSocket-style ping/pong. Native-only —
gRPC-Web transports cannot speak full-duplex, so browsers stay on
XmtpMlsStreams with a client-side watchdog.
Required Associated Types§
type SubscribeStream: Stream<Item = Result<SubscribeResponse, Self::Error>> + MaybeSend
type Error: RetryableError + 'static
Required Methods§
Sourcefn host(&self) -> &str
fn host(&self) -> &str
Return the URL used for bidi connections. Combine it with the API client’s Arc identity when selecting a shared connection.
Sourcefn subscribe_bidi<'life0, 'async_trait>(
&'life0 self,
requests: Pin<Box<dyn Stream<Item = SubscribeRequest> + Send>>,
) -> Pin<Box<dyn Future<Output = Result<Self::SubscribeStream, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn subscribe_bidi<'life0, 'async_trait>(
&'life0 self,
requests: Pin<Box<dyn Stream<Item = SubscribeRequest> + Send>>,
) -> Pin<Box<dyn Future<Output = Result<Self::SubscribeStream, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Open the bidirectional stream. requests is the outbound
client→server frame stream (typically fed by a channel; the first
frame is an Update naming the initial topic set); the
returned stream yields the server→client frames.
Provided Methods§
Sourcefn bidi_limits(&self) -> Arc<LimitsConfiguration> ⓘ
fn bidi_limits(&self) -> Arc<LimitsConfiguration> ⓘ
The frame shapes this deployment accepts (CFG-064), as installed by
XmtpBackendClient::set_limits. The bidi ledger chunks interest
updates below ApiClientWrapper, so it cannot read the wrapper’s
copy and asks the transport instead. A transport that was never told
reports the compiled defaults.