Expand description
Calling the sealed contract’s operations over a transport.
Every hand-written URL builder a client used to carry is one line here: the
verb, the path template, and the parameter routing all come from
contracts/tapes-api.yaml. A parameter the contract does not declare is
refused before anything is sent, because a server that ignores an unknown
query parameter would otherwise hide the drift a vendored contract exists to
catch.
§The typed surface is the default
The named methods return the models in crate::core::models, because the
shape of a sealed response is not a consumer’s opinion — it is published,
vendored here, and held to the document by a build-time gate. A client that
modelled it privately was keeping a second copy of a shared fact.
The generic seam is still here, one layer down: CoreClient::call is
generic in its response type and reaches every operation by operationId,
including the ones no method below names. That is the escape hatch, and
it is the right tool in two places — an operation this crate has not typed
yet, and the fidelity reads where a typed decode would quietly truncate an
archive of a newer server’s data. It is not the default, and a call site
that reaches for it should be able to say which of those two it is.
The named methods remain conveniences over CoreClient::call and nothing
more: the same operation table, the same routing, the same refusals. Anything
else would be a second contract that can disagree with the first.
Structs§
- Core
Client - The sealed read surface, bound to one transport.