http
ModuleContents
Structs
CallOne request an adapter makes.HttpThe default `Requester`: encodes, sends and decodes over HTTP.MultiRequests an adapter sends at once: one per URL and body, either side repeated when it holds a single entry.ReplyA provider's answer, or the transport failure that stood in its way.Traits
RequesterPerforms an adapter's requests. Implement it to answer them some other way (canned replies in tests, a proxy, a queue).TransportSends an HTTP request: any `utopia_client` client, or a transport of your own.use utopia_messaging::Call;Rust
pub struct CallOne request an adapter makes.
use utopia_messaging::Http;Rust
pub struct HttpThe default [Requester]: encodes, sends and decodes over HTTP.
Also implements
Debug.use utopia_messaging::Multi;Rust
pub struct MultiRequests an adapter sends at once: one per URL and body, either side repeated when it holds a single entry.
use utopia_messaging::Reply;Rust
pub struct ReplyA provider's answer, or the transport failure that stood in its way.
use utopia_messaging::Requester;Rust
pub trait Requester: Send + SyncPerforms an adapter's requests. Implement it to answer them some other way (canned replies in tests, a proxy, a queue).
Implemented byHttp
use utopia_messaging::Transport;Rust
pub trait Transport: Send + SyncSends an HTTP request: any utopia_client client, or a transport of
your own.
Rust
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>A boxed future, for the object-safe traits of this crate.
Rust
pub type OnResult<'a> = dyn Fn(Reply) -> Result<(), Error> + Send + Sync + 'aTakes each reply of a Multi as its request completes.
Rust
pub const MAX_CONCURRENT_REQUESTS: usize = 25The most requests a Multi keeps in flight.