lib.rsannotatedlib.rssource18 lines · 822 B · raw

A System One client independent of any runtime or HTTP stack.

The policy lives here, once: retries and their budget, per-attempt timeouts, "never sent" redials, request ids on every error, and error classification. It reaches the world through two ports, [Transport] (send one request) and [Runtime] (time and randomness), which an adapter implements: postjevsql-pg over a Postgres WaitEventSet, or a fake in tests, where time is virtual and runs deterministically. An [Observer] hears each attempt, retry, redial and answer.

10#![forbid(unsafe_code)]
12mod client;
13mod error;
14mod ports;
15
16pub use client::{Answered, Client};
17pub use error::ClientError;
18pub use ports::{Event, HttpRequest, Instant, HttpResponse, Observer, Runtime, Transport, TransportError, TransportErrorKind};