Struct jsonrpc_core::IoHandler [−][src]
Expand description
Simplified IoHandler
with no Metadata
associated with each request.
Implementations
Creates new IoHandler
without any metadata compatible with specified protocol version.
Handle given string request asynchronously.
pub fn handle_rpc_request(
&self,
request: Request
) -> FutureRpcResult<FutureResponse, FutureOutput>
[src]
pub fn handle_rpc_request(
&self,
request: Request
) -> FutureRpcResult<FutureResponse, FutureOutput>
[src]Handle deserialized RPC request asynchronously.
pub fn handle_call(
&self,
call: Call
) -> Either<FutureOutput, Either<FutureOutput, Ready<Option<Output>>>>
[src]
pub fn handle_call(
&self,
call: Call
) -> Either<FutureOutput, Either<FutureOutput, Ready<Option<Output>>>>
[src]Handle single Call asynchronously.
Handle given request synchronously - will block until response is available.
If you have any asynchronous methods in your RPC it is much wiser to use
handle_request
instead and deal with asynchronous requests in a non-blocking fashion.
Methods from Deref<Target = MetaIoHandler<M>>
Adds new supported synchronous method.
A backward-compatible wrapper.
Adds new supported asynchronous method.
pub fn add_notification<F>(&mut self, name: &str, notification: F) where
F: RpcNotificationSimple,
[src]
pub fn add_notification<F>(&mut self, name: &str, notification: F) where
F: RpcNotificationSimple,
[src]Adds new supported notification
Adds new supported asynchronous method with metadata support.
pub fn add_notification_with_meta<F>(&mut self, name: &str, notification: F) where
F: RpcNotification<T>,
[src]
pub fn add_notification_with_meta<F>(&mut self, name: &str, notification: F) where
F: RpcNotification<T>,
[src]Adds new supported notification with metadata support.
pub fn extend_with<F>(&mut self, methods: F) where
F: IntoIterator<Item = (String, RemoteProcedure<T>)>,
[src]
pub fn extend_with<F>(&mut self, methods: F) where
F: IntoIterator<Item = (String, RemoteProcedure<T>)>,
[src]Extend this MetaIoHandler
with methods defined elsewhere.
Handle given request synchronously - will block until response is available.
If you have any asynchronous methods in your RPC it is much wiser to use
handle_request
instead and deal with asynchronous requests in a non-blocking fashion.
pub fn handle_request(
&self,
request: &str,
meta: T
) -> FutureResult<S::Future, S::CallFuture>
[src]
pub fn handle_request(
&self,
request: &str,
meta: T
) -> FutureResult<S::Future, S::CallFuture>
[src]Handle given request asynchronously.
pub fn handle_rpc_request(
&self,
request: Request,
meta: T
) -> FutureRpcResult<S::Future, S::CallFuture>
[src]
pub fn handle_rpc_request(
&self,
request: Request,
meta: T
) -> FutureRpcResult<S::Future, S::CallFuture>
[src]Handle deserialized RPC request.
pub fn handle_call(
&self,
call: Call,
meta: T
) -> Either<S::CallFuture, Either<FutureOutput, Ready<Option<Output>>>>
[src]
pub fn handle_call(
&self,
call: Call,
meta: T
) -> Either<S::CallFuture, Either<FutureOutput, Ready<Option<Output>>>>
[src]Handle single call asynchronously.
Trait Implementations
type Target = MetaIoHandler<M>
type Target = MetaIoHandler<M>
The resulting type after dereferencing.
type Item = <MetaIoHandler<T> as IntoIterator>::Item
type Item = <MetaIoHandler<T> as IntoIterator>::Item
The type of the elements being iterated over.
type IntoIter = <MetaIoHandler<T> as IntoIterator>::IntoIter
type IntoIter = <MetaIoHandler<T> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
Extend given handler
with additional methods.
Auto Trait Implementations
impl<M = ()> !RefUnwindSafe for IoHandler<M>
impl<M = ()> !UnwindSafe for IoHandler<M>
Blanket Implementations
Mutably borrows from an owned value. Read more