Trait witty_jsonrpc::server::Server
source · pub trait Server<H>where
H: Handler,{
type Error;
// Required methods
fn start(&mut self) -> Result<(), Self::Error>;
fn stop(&mut self) -> Result<(), Self::Error>;
fn add_method<F>(&mut self, name: &str, method: F)
where F: RpcMethodSimple;
fn add_subscription<F, G>(
&mut self,
notification: &str,
subscribe: (&str, F),
unsubscribe: (&str, G)
)
where F: SubscribeRpcMethod<H::Metadata>,
G: UnsubscribeRpcMethod<H::Metadata>;
fn describe_api(&self) -> Vec<String>;
}