Rust

adapter

Module

The transport interface every adapter and decorator implements, and the configuration they share.

Contents

use utopia_client::Certificate;
Rust
pub struct Certificate

A client certificate for mutual TLS.

use utopia_client::Options;
Rust
pub struct Options

Undocumented.

Also implements Default.
use utopia_client::Tls;
Rust
pub enum Tls

The lowest TLS protocol version a connection may negotiate.

The Rust transport speaks TLS 1.2 and 1.3 only, so Tls::V1_0 and Tls::V1_1 allow what Tls::V1_2 allows: older versions are never negotiated.

use utopia_client::Adapter;
Rust
pub trait Adapter: Send + Sync + Sized

A transport: sends requests, buffering or streaming the response, under Options changed by returning a reconfigured copy.

Decorators implement it too, wrapping another adapter, so they compose: Retry is one. Implement it to add a transport or a decorator of your own.

Implemented byHttpClientRetry
use utopia_client::Sink;
Rust
pub trait Sink: Send

Where a streamed response body goes, chunk by chunk.

Any FnMut(&[u8]) + Send closure is a sink.

Implemented byF