Accumulates queued [BatchableCall]s into a single
POST /rpc/batch round-trip. Build via RpcClient::batch_builder
or the macro-generated Client::batch().
The CBOR codec. decode refuses input nested deeper than
[DEFAULT_MAX_DECODE_DEPTH] levels (cratestack#1315); use
CborCodec::with_max_depth for another limit.
Re-exported from cratestack-codec-cbor, where the scanner moved so
server-side byte-stream bindings (WebTransport) share it with this
client. The cratestack_client_rust::CborSeqChunkDecoder path is
unchanged.
Stateful boundary scanner for application/cbor-seq streams. Bytes
arrive in arbitrary chunks; this type buffers them and emits the
byte ranges of any complete top-level CBOR items observed so far.
The CBOR-level parse uses minicbor::Decoder::skip for boundary
detection (cheap, doesn’t allocate); the per-item serde decode
happens at the caller’s leisure on each returned slice.
Every WWW-Authenticate value an error answer carried, raw and in the
order they arrived (cratestack#1243): an AuthRefusal’s challenges.
Unparsed: a challenge’s own grammar (RFC 9110 §11.6.1) is the caller’s.
Whether one outbound request may be replayed byte-for-byte without
an idempotency key — the single fact a retry middleware needs and
cannot work out for itself.
Error variant produced by the RPC client when a remote call fails with
an RpcErrorBody payload. Distinct from the REST ClientError::Remote
(which carries the CratestackErrorResponse shape) so library users can
switch on the gRPC-style code string directly.
Top-level error returned by the RPC client. Mirrors ClientError
(the REST error type) but reports server-side failures as
RpcRemoteError { code, message, details } rather than the
REST-shaped CratestackErrorResponse.
FFI-shaped chunk delivered to the execute_streamed callback.
Item carries one CBOR-encoded item’s raw bytes; Error is
terminal; End is terminal and indicates a clean stream close.
Back-compat alias — the trait moved to cratestack-core and was
renamed ProjectionDecoder to free up the Projection name for
the SQL value type in cratestack-sql.
Async by design (issue #453): real credential providers — an OAuth2
client-credentials token with a refresh-on-expiry cache, for instance —
need to make an HTTP call on a cache miss, which a sync authorize
can’t do without block_on (panics/deadlocks depending on the runtime)
or a pre-fetch-and-stash workaround that reintroduces the expiry race
the cache existed to avoid. #[async_trait] (rather than a bare
async fn in the trait) keeps Arc<dyn RequestAuthorizer> —
CratestackClient::with_request_authorizer stores the authorizer as
a trait object — dyn-compatible; native AFIT would drop that. Same
convention other dyn-dispatched async hook traits already use elsewhere
in the workspace (e.g. cratestack_core::audit::AuditSink).
segment as one URL path segment: everything but the RFC 3986 unreserved
characters is percent-encoded, so an id such as 50%off or a/b reaches
the server as the value the seal binds.
Run call (a future, or anything .await takes, such as a generated
RPC method’s call); when it fails with a step-up refusal, hand the refusal to
reprove and, when that answers true (the caller authenticated
again), run callonce more and return what it gives, even a
second step-up refusal. Never loops.
A live subscription: items until the server ends it, or a terminal Err.
None after an Err, or when the stream ends normally (a subscription
procedure whose source ran out). Dropping it cancels the subscription.
Stable alias for the receiver shape that [RpcClient::call_streaming]
returns. Exists so macro-generated code (include_client_schema! for
transport rpc schemas) has a single name to bind without
re-spelling the tokio/error-type plumbing on every method, and so
downstream users have a typedef they can store in struct fields,
function returns, etc. without leaking the implementation detail.