pub trait JsonRpcMount {
// Required methods
fn jsonrpc_mount_methods() -> Vec<String>;
fn jsonrpc_mount_dispatch(
&self,
method: &str,
params: Value,
) -> Result<Value, String>;
fn jsonrpc_mount_dispatch_async(
&self,
method: &str,
params: Value,
) -> impl Future<Output = Result<Value, String>> + Send;
}Expand description
Trait for types that can be mounted as JSON-RPC method namespaces.
Implemented automatically by #[jsonrpc] on an impl block. Allows nested
composition: a parent JSON-RPC server can mount a child’s methods with a dot-separated prefix.
Required Methods§
Sourcefn jsonrpc_mount_methods() -> Vec<String>
fn jsonrpc_mount_methods() -> Vec<String>
Get method names for this mount (without prefix).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".