pub trait XmtpBackendClient: MaybeSend + MaybeSync {
type Error: RetryableError + MaybeSend + MaybeSync + 'static;
// Required methods
fn publish<'life0, 'async_trait>(
&'life0 self,
request: PublishRequest,
) -> Pin<Box<dyn Future<Output = Result<PublishResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn query<'life0, 'async_trait>(
&'life0 self,
request: QueryRequest,
) -> Pin<Box<dyn Future<Output = Result<QueryResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn query_newest<'life0, 'async_trait>(
&'life0 self,
request: QueryNewestRequest,
) -> Pin<Box<dyn Future<Output = Result<QueryNewestResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_inbox_ids<'life0, 'async_trait>(
&'life0 self,
request: GetInboxIdsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetInboxIdsResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_configuration<'life0, 'async_trait>(
&'life0 self,
request: GetConfigurationRequest,
) -> Pin<Box<dyn Future<Output = Result<GetConfigurationResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn verify_smart_contract_wallet_signatures<'life0, 'async_trait>(
&'life0 self,
request: VerifySmartContractWalletSignaturesRequest,
) -> Pin<Box<dyn Future<Output = Result<VerifySmartContractWalletSignaturesResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register<'life0, 'async_trait>(
&'life0 self,
request: RegisterRequest,
) -> Pin<Box<dyn Future<Output = Result<RecipientState, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unregister<'life0, 'async_trait>(
&'life0 self,
request: UnregisterRequest,
) -> Pin<Box<dyn Future<Output = Result<UnregisterResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_subscriptions<'life0, 'async_trait>(
&'life0 self,
request: UpdateSubscriptionsRequest,
) -> Pin<Box<dyn Future<Output = Result<RecipientState, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn backend_url(&self) -> Option<&str> { ... }
fn has_credential_source(&self) -> bool { ... }
fn set_limits(&self, limits: Arc<LimitsConfiguration>) { ... }
}Expand description
The backend unary RPCs. Callers own retries and chunking.
Required Associated Types§
type Error: RetryableError + MaybeSend + MaybeSync + 'static
Required Methods§
fn publish<'life0, 'async_trait>(
&'life0 self,
request: PublishRequest,
) -> Pin<Box<dyn Future<Output = Result<PublishResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
request: QueryRequest,
) -> Pin<Box<dyn Future<Output = Result<QueryResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_newest<'life0, 'async_trait>(
&'life0 self,
request: QueryNewestRequest,
) -> Pin<Box<dyn Future<Output = Result<QueryNewestResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_inbox_ids<'life0, 'async_trait>(
&'life0 self,
request: GetInboxIdsRequest,
) -> Pin<Box<dyn Future<Output = Result<GetInboxIdsResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn get_configuration<'life0, 'async_trait>(
&'life0 self,
request: GetConfigurationRequest,
) -> Pin<Box<dyn Future<Output = Result<GetConfigurationResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_configuration<'life0, 'async_trait>(
&'life0 self,
request: GetConfigurationRequest,
) -> Pin<Box<dyn Future<Output = Result<GetConfigurationResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read what this deployment publishes about itself. Served without a credential, so it is the one call a client can make before it knows whether the deployment requires one.
fn verify_smart_contract_wallet_signatures<'life0, 'async_trait>(
&'life0 self,
request: VerifySmartContractWalletSignaturesRequest,
) -> Pin<Box<dyn Future<Output = Result<VerifySmartContractWalletSignaturesResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register<'life0, 'async_trait>(
&'life0 self,
request: RegisterRequest,
) -> Pin<Box<dyn Future<Output = Result<RecipientState, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unregister<'life0, 'async_trait>(
&'life0 self,
request: UnregisterRequest,
) -> Pin<Box<dyn Future<Output = Result<UnregisterResponse, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_subscriptions<'life0, 'async_trait>(
&'life0 self,
request: UpdateSubscriptionsRequest,
) -> Pin<Box<dyn Future<Output = Result<RecipientState, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn backend_url(&self) -> Option<&str>
fn backend_url(&self) -> Option<&str>
The backend URL this client sends to, when the transport knows it.
The stored configuration row records the URL its copy came from, and
build compares the two (CFG-042, CFG-055). A transport that cannot
name a URL — a test double, for instance — returns None, and the
comparison is skipped.
Sourcefn has_credential_source(&self) -> bool
fn has_credential_source(&self) -> bool
Whether a credential source — an auth callback or an auth handle — was
configured on this transport (CFG-062). A transport with no auth
middleware reports false and build refuses a deployment that
requires authentication. Defaults to true so a test double, which has
no transport stack to ask, is never the thing that refuses a build.
Sourcefn set_limits(&self, limits: Arc<LimitsConfiguration>)
fn set_limits(&self, limits: Arc<LimitsConfiguration>)
Install the shapes the deployment publishes (CFG-064), so the stream and
metadata chunking that happens below ApiClientWrapper uses them too.
Called once, by build, before any stream opens. A transport with
nothing to chunk ignores it.