Expand description
§Semver quarantine
The traits in this module are the contract for backend and runtime authors. It has not yet been validated against every backend, so:
Breaking changes in unversioned ship in a minor version, not a major.
This trick is borrowed from ureq. Without it, 1.0 is unshippable: you
can’t freeze a trait without having checked it against native, wasi:http,
and fetch.
Modules§
- erased
- Type-erased forms of
crate::unversioned::TransportandTimer, so a facade can be one concrete type instead of two type parameters.
Structs§
- Close
Frame - The close code and reason of a
Message::Close. - Closed
- A connection ended.
- Connect
Timing - What each phase of a connect cost.
- Connected
- A connection was established.
- Connection
Id - Which connection an event is about.
- Discard
- Adapts a future that resolves to something into one that resolves to
(), for use as aTimer::Sleep. - Head
- The response head arrived.
- Informational
- A
1xxthat arrived before the response. - NoHooks
- The hook a caller who asked for nothing gets:
WATCHINGisfalse, the type is zero-sized, andonhas no body. - Reused
- A connection was taken from the pool instead of being made.
Enums§
- Close
Reason - Why a connection ended.
- Event
- What a transport reports.
- Message
- One WebSocket message, in the vocabulary every backend can speak.
Traits§
- Hooks
- Somewhere to send what a transport did.
- Timer
- The one runtime capability the portable core needs: timeouts and backoff. Networking and spawning live in the transports.
- Transport
- The one seam between hclient and real HTTP.
- WebSocket
- An open WebSocket: messages out, messages in.
- WebSocket
Connect - A backend that can open a WebSocket.