Struct jsonrpsee_ws_server::RpcModule [−][src]
pub struct RpcModule { /* fields omitted */ }
Implementations
impl RpcModule
[src]
impl RpcModule
[src]pub fn new() -> Self
[src]
Instantiate a new RpcModule
.
pub fn with_context<Context>(self, ctx: Context) -> RpcContextModule<Context>
[src]
Add context for this module, turning it into an RpcContextModule
.
pub fn register_method<F, R>(
&mut self,
method_name: &'static str,
callback: F
) -> Result<(), Error> where
R: Serialize,
F: RpcMethod<R>,
[src]
&mut self,
method_name: &'static str,
callback: F
) -> Result<(), Error> where
R: Serialize,
F: RpcMethod<R>,
Register a new RPC method, which responds with a given callback.
pub fn register_subscription(
&mut self,
subscribe_method_name: &'static str,
unsubscribe_method_name: &'static str
) -> Result<SubscriptionSink, Error>
[src]
&mut self,
subscribe_method_name: &'static str,
unsubscribe_method_name: &'static str
) -> Result<SubscriptionSink, Error>
Register a new RPC subscription, with subscribe and unsubscribe methods.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for RpcModule
impl !RefUnwindSafe for RpcModule
impl !UnwindSafe for RpcModule
impl !UnwindSafe for RpcModule