reth_rpc_builder/
middleware.rs1use jsonrpsee::server::middleware::rpc::RpcService;
2use tower::Layer;
3
4pub trait RethRpcMiddleware:
6 Layer<
7 RpcService,
8 Service: jsonrpsee::server::middleware::rpc::RpcServiceT<
9 MethodResponse = jsonrpsee::MethodResponse,
10 BatchResponse = jsonrpsee::MethodResponse,
11 NotificationResponse = jsonrpsee::MethodResponse,
12 > + Send
13 + Sync
14 + Clone
15 + 'static,
16 > + Clone
17 + Send
18 + 'static
19{
20}
21
22impl<T> RethRpcMiddleware for T where
23 T: Layer<
24 RpcService,
25 Service: jsonrpsee::server::middleware::rpc::RpcServiceT<
26 MethodResponse = jsonrpsee::MethodResponse,
27 BatchResponse = jsonrpsee::MethodResponse,
28 NotificationResponse = jsonrpsee::MethodResponse,
29 > + Send
30 + Sync
31 + Clone
32 + 'static,
33 > + Clone
34 + Send
35 + 'static
36{
37}