Skip to main content

Module client

Module client 

Source
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.
ClientConfig
What a client offers a server, before anything is negotiated.

Enums§

ClientError
Why a client call did not happen.
ConnectError
Why a session could not be opened.
HandshakeError
Why a session could not be established.
StdioConnectError
What failed when Client::connect_stdio could not open a session.
TransportError
Why a request did not complete.

Constants§

DISCOVER
The method that opens a 2026-07-28 session.
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§

ClientTransport
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/discover answer into a session.
handshake
Establishes a session over transport.
initialize_params
The initialize params: the offer, what this client can do, and who it is.
initialize_session
Reads an initialize answer into a session.
offer
The revision this client prefers, and the set it can speak.
open
Opens spec, negotiates, and binds the result.