Expand description
Client — the calling side of a negotiated session.
§What it is
A client holds the revisions it will speak, in preference order, and the features it wants. It does not open a connection: a transport does that, and until T13 supplies one, a test can hand the client a closure directly.
§The gate, and where it lives
Every typed method consults the resolved FeatureProfile before it does
anything, exactly as the server’s
RequestContext does. The
asymmetry is deliberate: the server’s gate protects the peer from a
feature the server did not negotiate, and the client’s gate protects the
caller from a round trip that cannot work.
Both produce the same ClientError, because from the caller’s side
“this session cannot do that” is one fact with one fix — configure a
version that can, or drop the call.
Modules§
- bearer
- How a client authenticates to an HTTP server.
- handler
- Answering the requests a server sends the client.
- inputs
- Answering a server’s request for input (SEP-2322,
2026-07-28).
Structs§
- Client
- A client bound to a negotiated session.
- Client
Config - What a client offers a server, before anything is negotiated.
Enums§
- Client
Error - Why a client call did not happen.
- Connect
Error - Why a session could not be opened.
- Handshake
Error - Why a session could not be established.
- Stdio
Connect Error - What failed when
Client::connect_stdiocould not open a session. - Transport
Error - Why a request did not complete.
Constants§
- DISCOVER
- The method that opens a
2026-07-28session. - INITIALIZE
- The method that opens every other session this crate speaks.
- INITIALIZED
- The notification that ends a handshake, on the revisions that have one.
Traits§
- Client
Transport - Sends one request to the peer and returns its answer.
Functions§
- default_
versions - The revisions a client offers when the caller expresses no preference.
- discover_
session - Reads a
server/discoveranswer into a session. - handshake
- Establishes a session over
transport. - initialize_
params - The
initializeparams: the offer, what this client can do, and who it is. - initialize_
session - Reads an
initializeanswer into a session. - offer
- The revision this client prefers, and the set it can speak.
- open
- Opens
spec, negotiates, and binds the result.