Crate trillium_client[][src]

Expand description

trillium client is a http client that uses the same conn approach as trillium.

this was primarily built for the trillium_proxy crate, but might end up fitting well into trillium apps for other purposes.

In order to use http keep-alive connection pooling, make requests from a trillium_client::Client. To make a one-off request, build a trillium_client::Conn directly. Please note that a trillium_client Conn, while conceptually similar, is different from trillium::Conn and trillium_http::Conn.

Connector

Client and Conn are generic over an implementation of Connector. Each runtime crate (trillium_smol, trillium_tokio, trillium_async_std) offers a Connector implementation, which can optionally be combined with a tls crate (trillium_rustls and trillium_native_tls each offer Connector wrappers.

See the documentation for Client and Conn for further usage examples.

Re-exports

pub use trillium_http::http_types;

Structs

Client

A client contains a Config and an optional connection pool and builds conns.

Conn

a client connection, representing both an outbound http request and a http response

Enums

Error

Concrete errors that occur within trillium’s http implementation

Traits

Connector

Interface for runtime and tls adapters for the trillium client

Type Definitions

Result

this crate’s result type