Skip to main content

turul_rpc_server/
lib.rs

1//! # turul-rpc-server
2//!
3//! Async JSON-RPC 2.0 dispatcher and handler trait for `turul-rpc`. The
4//! `JsonRpcDispatcher<E>` routes incoming requests to registered handlers
5//! and converts handler-returned domain errors to JSON-RPC error responses
6//! via the [`ToJsonRpcError`] trait.
7//!
8//! Most consumers should depend on the [`turul-rpc`] facade instead of
9//! this crate directly.
10//!
11//! [`turul-rpc`]: https://crates.io/crates/turul-rpc
12//! [`ToJsonRpcError`]: handler::ToJsonRpcError
13
14#[cfg(feature = "async")]
15pub mod dispatcher;
16#[cfg(feature = "async")]
17pub mod handler;
18#[cfg(feature = "async")]
19pub mod session;
20
21#[cfg(feature = "streams")]
22pub mod streaming;
23
24#[cfg(feature = "async")]
25pub use dispatcher::JsonRpcDispatcher;
26#[cfg(feature = "async")]
27pub use handler::{FunctionHandler, JsonRpcHandler, ToJsonRpcError};
28#[cfg(feature = "async")]
29pub use session::SessionContext;