Expand description
RPC binding wire types.
Both the server binding (cratestack-axum::rpc) and every
generated client (cratestack-client-rust, the TS / Dart
generators) agree on these shapes. They live in cratestack-core
so clients can depend on a single source of truth without pulling
in axum.
Server-only helpers (codec-aware encoding, axum response
post-processing, batch frame assembly) stay in
cratestack-axum::rpc. This module owns only the wire shapes and
the CoolError → gRPC-style code mapping.
Structs§
- RpcError
Body - Wire shape of a single error returned by an RPC call. Maps from
CoolErrorviarpc_code+CoolError::public_message. - RpcRequest
- Wire shape of a single batch request frame.
- RpcResponse
Frame - Wire shape of a single batch response frame.
Constants§
- RPC_
BATCH_ PATH - Mount path for batched RPC calls. Body is a codec-encoded sequence
of
RpcRequestframes. - 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.
Functions§
- cool_
error_ code_ to_ rpc_ code - Map a
CoolErrorResponse.codestring (screaming-snake, REST- binding vocabulary) to the stable gRPC-style code the RPC binding emits. - rpc_
code - Map a
CoolErrorto its stable RPC code (gRPC-style snake_case).