Module api

Module api 

Source

Modules§

stream
Default XMTP Stream

Structs§

Ignore
Concrete type of the ignore combinator
IgnoreSpecialized
RetryQuery
The concrete type of a crate::api::retry Combinators. Generally using the concrete type can be avoided with type inference or impl Trait.
RetrySpecialized
V3Paged
Endpoint that is paged with [PagingInfo] implements the v3 backend paging algorithm for endpoints which implement the Pageable trait
V3PagedSpecialized
XmtpStream
A stream which maps the tonic error to ApiClientError, and attaches endpoint metadata

Enums§

ApiClientError
BodyError

Traits§

BoxClientT
Client
A client represents how a request body is formed and sent into a backend. The client is protocol agnostic, a Client may communicate with a backend over gRPC, JSON-RPC, HTTP-REST, etc. http::Response’s are used in order to maintain a common data format compatible with a wide variety of backends. an http response is easily derived from a grpc, jsonrpc or rest api.
Endpoint
provides the necessary information for a backend API call. Indicates the Output type
EndpointExt
HasStats
IsConnectedCheck
Pageable
Trait indicating an Endpoint can be paged paging will return a limited number of results per request. a cursor is present indicating the position in the total list of results on the backend.
Query
Queries describe the way an endpoint is called. these are extensions to the behavior of specific endpoints.
QueryRaw
QueryStream
a companion to the Query trait, except for streaming calls. Not every query combinator/extension will apply to both steams and one-off calls (how do you ‘page’ a streaming api?), so these traits are separated.
QueryStreamExt
ToBoxedClient
VectorClock
common functions w.r.t vector clock types mostly used as an extension trait to GlobalCursor

Functions§

ignore
Ignore/drop the response data for this endpoint does not ignore any errors that might have occurred as a result of making a network request. the response body still must be valid protobuf
retry
retry with the default retry strategy (ExponentialBackoff)
retry_with_strategy
Retry the endpoint, indicating a specific strategy to retry with
v3_paged
Set an endpoint to be paged with v3 paging info

Type Aliases§

ArcClient
a type-erased version of Client in an Arc
BoxClient
a boxed version of Client