Skip to main content

SyncMethod

Type Alias SyncMethod 

pub type SyncMethod = Arc<dyn Fn(Id<'_>, Params<'_>, usize) -> MethodResponse + Sync + Send>;
Expand description

A MethodCallback is an RPC endpoint, callable with a standard JSON-RPC request, implemented as a function pointer to a Fn function taking four arguments: the id, params, a channel the function uses to communicate the result (or error) back to jsonrpsee, and the connection ID (useful for the websocket transport).

Aliased Type§

pub struct SyncMethod { /* private fields */ }

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 16 bytes