Expand description
The rustev.remote/1 protocol documents (spec 009, 3.10) and the
vendor-neutral exchange record rustev.remote-exchange/1 (3.9.1).
Serde types only: no transport, no async runtime, and no vendor, model or
provider name (spec 009, I-7). Every document denies unknown fields,
carries an exact schema string and parses under a declared limit set
through the bounded parser (crate::Document::parse). On the wire a
document is its record canonical bytes (spec 004, 5.6), which equal its
canonical bytes whenever it holds no fractional number.
Nothing a remote party returns is authorization (spec 009, 3.1): an
infer answer is a RawOutput or a classified failure, and everything
else it carries is retained in the exchange record, which no policy
reads.
Structs§
- Cancel
Item - Cancel
Request - Cancel
Response - Connection
Observation - The connection an exchange used (spec 020, 3.5): fresh or reused, a nonsecret instance id, its age bucket and use count, the multiplex posture, the isolation-key digest, and why it left the pool after this exchange, if it did.
- Describe
Request - The protocol major versions the client supports (spec 009, 3.10.1).
- Describe
Response - The chosen version and, per hosted backend, its descriptor, descriptor identity and terms.
- Exchange
Member - Exchange
Record - One exchange, keyed by the attempt ids it served (spec 009, 3.9.1).
Bounded: every string is cut to
MAX_TEXT_BYTESand every collection to its cap byExchangeRecord::bounded, so a record never exceedsEXCHANGE_V1’smax_bytes. Request and response bytes are never in the record; only their digests are. - Hosted
Backend - Infer
Item - Infer
Request - Infer
Response - Item
Answer - Phase
Expiry - The phase that ran out (spec 020, 3.4): its configured ceiling, the effective allowance it started with (the lesser of the ceiling and the remaining attempt budget), the time observed in it, whether request bytes had left, and the existing code the expiry mapped to.
- Principal
Evidence - A principal reference as evidence holds it (spec 020, 3.2 and 3.6): its domain-separated digest and mapping version, never the reference.
- Remote
Terms - Terms negotiated beside the descriptor (spec 009, 3.2.4). The runtime never reads them; the adapter enforces and records them.
- Reported
Cost - Served
Identity - A served identity as recorded (spec 009, 3.7).
- Served
Terms - Served-identity disclosure as negotiated.
identityis the pinned identity, present exactly whendisclosureispinned. - Wire
Principal - An opaque principal reference on the wire (spec 020, 3.6): the host’s bytes as lowercase hexadecimal, the host’s mapping version, and the declared scope. Rustev never interprets, authenticates, authorizes or expands it.
Enums§
- AgeBucket
- A connection’s age when an exchange took it, bucketed so evidence holds no timing beyond what the bound needs.
- Attribution
- How an exchange’s charge reached its members (spec 009, 3.10.4).
- Batching
- Shared-state batching support (spec 009, 3.10.4).
- Cancel
Support - How far the remote side supports cancellation (spec 009, 3.2.4).
- Connection
Reuse - Whether an exchange’s connection was opened for it or reused.
- Disclosure
- What a served identity is worth (spec 009, 3.7).
- Eviction
Reason - Why a pooled connection left the pool (spec 020, 3.5).
- Item
Result - Member
Outcome - Multiplex
- How requests share a connection. HTTP/1.1, the only binding today, carries one request at a time.
- Phase
Limit - What bounded a phase that ran out: its own ceiling, or the remaining attempt budget when that was smaller (spec 020, 3.4).
- Remote
Cancel Answer - Remote
Code - The closed error taxonomy (spec 009, 3.6). Each code maps to exactly one spec 003 failure class; the mapping lives with the adapters, because the failure classes of the backend seam are not contract types.
- Transport
Phase - A transport phase with its own ceiling inside the one attempt budget (spec 020, 3.4), in the order an exchange passes through them.
Constants§
- MAX_
ENTRIES - The most entries of each map (usage, privacy options, provider extras) an exchange record keeps.
- MAX_
ITEMS - The most items one infer request may carry, whatever the terms say, and the most members an exchange record lists.
- MAX_
PRINCIPAL_ BYTES - The most bytes of an opaque principal reference (spec 020, 3.6).
- MAX_
PRINCIPAL_ LABEL_ BYTES - The most bytes of a principal mapping version or scope.
- MAX_
ROUTE - The most route entries an exchange record keeps.
- MAX_
TEXT_ BYTES - Free text in a failure detail or an exchange record is cut to this many bytes (spec 009, 3.9.1; spec 003, 3.9.3).
- PRINCIPAL_
DIGEST_ TAG - The domain tag of a principal reference’s evidence digest.
- PROTOCOL
- The protocol’s name, as recorded in exchange records.
- PROTOCOL_
MAJOR - The protocol’s major version.
- PROTOCOL_
MAJOR_ V2 rustev.remote/2(spec 020, 2): version 1 plus the wire members spec 020 defines, today the host-endpoint principal reference of an infer request (3.6). The documents keep their schema strings and carryversion: 2.- PROTOCOL_
V2
Functions§
- cut_
text scut to at mostMAX_TEXT_BYTESbytes, on a character boundary.- cut_to
scut to at mostmaxbytes, on a character boundary.- protocol_
name - The protocol name of a major version this crate defines.