Skip to main content

cratestack_client_rust/
lib.rs

1mod auth;
2mod client;
3mod codec;
4mod config;
5mod error;
6mod rpc;
7mod runtime;
8mod state;
9mod streaming;
10mod streaming_callback;
11
12#[cfg(test)]
13mod tests;
14
15pub use cratestack_codec_cbor::CborCodec;
16#[cfg(feature = "codec-json")]
17pub use cratestack_codec_json::JsonCodec;
18pub use cratestack_core::rpc::{
19    RPC_BATCH_PATH, RPC_UNARY_PATH, RpcErrorBody, RpcRequest, RpcResponseFrame, rpc_code,
20};
21
22pub use auth::{AuthorizationRequest, RequestAuthorizer};
23pub use client::CratestackClient;
24pub use codec::HttpClientCodec;
25pub use config::ClientConfig;
26pub use cratestack_core::ProjectionDecoder;
27/// Back-compat alias — the trait moved to `cratestack-core` and was
28/// renamed `ProjectionDecoder` to free up the `Projection` name for
29/// the SQL value type in `cratestack-sql`.
30#[deprecated(
31    since = "0.4.0",
32    note = "use `cratestack::ProjectionDecoder` (moved to cratestack-core) instead"
33)]
34pub use cratestack_core::ProjectionDecoder as Projection;
35pub use error::{ClientError, HeaderPair, QueryPair};
36pub use rpc::batch::{BatchBuilder, BatchResults};
37pub use rpc::batch_call::{BatchHandle, BatchableCall};
38pub use rpc::client::RpcClient;
39pub use rpc::error::{RpcClientError, RpcRemoteError, RpcStream};
40pub use runtime::handle::RuntimeHandle;
41pub use runtime::wire::{
42    RuntimeCodecConfig, RuntimeConfigWire, RuntimeEnvelopeConfig, RuntimeErrorCode,
43    RuntimeErrorWire, RuntimeHeader, RuntimeRequestWire, RuntimeResponseWire,
44    RuntimeStateStoreConfig, RuntimeTransportConfig,
45};
46pub use state::{
47    ClientStateStore, InMemoryStateStore, JsonFileStateStore, PersistedClientState,
48    RequestJournalEntry,
49};
50pub use streaming::CborSeqChunkDecoder;
51pub use streaming_callback::RuntimeChunkWire;