Skip to main content

Crate id_effect_rpc

Crate id_effect_rpc 

Source
Expand description

RPC-style HTTP helpers for id_effect Axum hosts — Phase D (@effect/rpc-shaped boundaries).

§Full stack (D3)

§Edge helpers (D2)

  • RpcError — JSON envelope + status + IntoResponse
  • correlationx-correlation-id propagation
  • codegen — service metadata and Rust trait stub emission
  • openapi — OpenAPI 3.0 JSON/YAML emission from route metadata
  • spantracing span helpers compatible with OpenTelemetry layers
  • versioning — API version negotiation middleware

Pair with id_effect_axum::json (decode_json_schema, JsonSchemaError) for per-route JSON validation (see the mdBook Axum host chapter).

Re-exports§

pub use client::RpcClient;
pub use client::RpcClientConfig;
pub use client::RpcClientError;
pub use error::RpcError;
pub use protocol::RPC_DISPATCH_PATH;
pub use protocol::RpcWireRequest;
pub use protocol::RpcWireResponse;
pub use registry::RpcGroup;
pub use registry::RpcMethodEntry;
pub use server::RpcServer;
pub use server::layer_rpc;

Modules§

client
RPC HTTP client — call remote tagged methods as Effect (RpcClient parity).
codegen
RPC service metadata and Rust trait stub emission (Phase D3 spike).
correlation
Correlation id helpers for RPC-style HTTP (x-correlation-id).
error
RpcError — structured JSON body + HTTP status + Axum IntoResponse.
openapi
OpenAPI 3.0 document emission from RPC / HTTP route metadata.
protocol
Tagged RPC wire messages for the HTTP+JSON protocol (@effect/rpc-shaped).
registry
RPC method registry — [] of tagged handlers ( [] parity).
serialization
JSON serialization and id_effect::schema bridging for RPC wire messages.
server
RPC HTTP server — mount tagged dispatch on Axum (RpcServer.layer parity).
span
Tracing helpers for RPC-shaped HTTP handlers.
stream
NDJSON streaming RPC responses (stream methods at the HTTP edge).
versioning
API version negotiation for RPC-shaped Axum routes.

Structs§

RpcEnvelope
Wire body returned for structured RPC errors.

Enums§

RpcErrorCode
Coarse error category for HTTP APIs (paired with an HTTP status in crate::RpcError).