Skip to main content

Crate cratestack_client_rust

Crate cratestack_client_rust 

Source

Structs§

AuthorizationRequest
BatchBuilder
Accumulates queued [BatchableCall]s into a single POST /rpc/batch round-trip. Build via RpcClient::batch_builder or the macro-generated Client::batch().
BatchHandle
A typed key returned by BatchableCall::queue. Pair it with [BatchResults::take] to extract the typed output for that op from the batch response.
BatchResults
Per-handle results from a sent batch. Each handle can be taken exactly once.
BatchableCall
A typed unary RPC call that has been prepared but not yet sent.
CborCodec
CborSeqChunkDecoder
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.
ClientConfig
CratestackClient
InMemoryStateStore
JsonCodec
JsonFileStateStore
PersistedClientState
RequestJournalEntry
RpcClient
Thin RPC client built on top of the REST client’s transport + codec plumbing.
RpcErrorBody
Wire shape of a single error returned by an RPC call. Maps from CoolError via rpc_code + CoolError::public_message.
RpcRemoteError
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 CoolErrorResponse shape) so library users can switch on the gRPC-style code string directly.
RpcRequest
Wire shape of a single batch request frame.
RpcResponseFrame
Wire shape of a single batch response frame.
RuntimeConfigWire
RuntimeErrorWire
RuntimeHandle
RuntimeHeader
RuntimeRequestWire
RuntimeResponseWire
RuntimeTransportConfig

Enums§

ClientError
RpcClientError
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 CoolErrorResponse.
RuntimeChunkWire
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.
RuntimeCodecConfig
RuntimeEnvelopeConfig
RuntimeErrorCode
RuntimeStateStoreConfig

Constants§

RPC_BATCH_PATH
Mount path for batched RPC calls. Body is a codec-encoded sequence of RpcRequest frames.
RPC_UNARY_PATH
Mount path for unary RPC calls. The trailing segment is the percent-decoded op id, e.g. POST /rpc/model.User.list.

Traits§

ClientStateStore
HttpClientCodec
Projection
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.
ProjectionDecoder
RequestAuthorizer

Functions§

rpc_code
Map a CoolError to its stable RPC code (gRPC-style snake_case).

Type Aliases§

HeaderPair
QueryPair
RpcStream
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.