Struct solana_jsonrpc_core::IoHandler [−][src]
Simplified IoHandler
with no Metadata
associated with each request.
Methods
impl IoHandler
[src]
impl IoHandler
pub fn new() -> Self
[src]
pub fn new() -> Self
Creates new IoHandler
without any metadata.
pub fn with_compatibility(compatibility: Compatibility) -> Self
[src]
pub fn with_compatibility(compatibility: Compatibility) -> Self
Creates new IoHandler
without any metadata compatible with specified protocol version.
impl<M: Metadata + Default> IoHandler<M>
[src]
impl<M: Metadata + Default> IoHandler<M>
pub fn handle_request(&self, request: &str) -> FutureResult<FutureResponse>
[src]
pub fn handle_request(&self, request: &str) -> FutureResult<FutureResponse>
Handle given string request asynchronously.
pub fn handle_rpc_request(
&self,
request: Request
) -> FutureRpcResult<FutureResponse>
[src]
pub fn handle_rpc_request(
&self,
request: Request
) -> FutureRpcResult<FutureResponse>
Handle deserialized RPC request asynchronously.
pub fn handle_call(&self, call: Call) -> FutureOutput
[src]
pub fn handle_call(&self, call: Call) -> FutureOutput
Handle single Call asynchronously.
pub fn handle_request_sync(&self, request: &str) -> Option<String>
[src]
pub fn handle_request_sync(&self, request: &str) -> Option<String>
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>>
pub fn add_alias(&mut self, alias: &str, other: &str)
[src]
pub fn add_alias(&mut self, alias: &str, other: &str)
Adds an alias to a method.
pub fn add_method<F>(&mut self, name: &str, method: F) where
F: RpcMethodSimple,
[src]
pub fn add_method<F>(&mut self, name: &str, method: F) where
F: RpcMethodSimple,
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,
Adds new supported notification
pub fn add_method_with_meta<F>(&mut self, name: &str, method: F) where
F: RpcMethod<T>,
[src]
pub fn add_method_with_meta<F>(&mut self, name: &str, method: F) where
F: RpcMethod<T>,
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>,
Adds new supported notification with metadata support.
pub fn extend_with<F>(&mut self, methods: F) where
F: Into<HashMap<String, RemoteProcedure<T>>>,
[src]
pub fn extend_with<F>(&mut self, methods: F) where
F: Into<HashMap<String, RemoteProcedure<T>>>,
Extend this MetaIoHandler
with methods defined elsewhere.
pub fn handle_request_sync(&self, request: &str, meta: T) -> Option<String>
[src]
pub fn handle_request_sync(&self, request: &str, meta: T) -> Option<String>
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>
[src]
pub fn handle_request(&self, request: &str, meta: T) -> FutureResult<S::Future>
Handle given request asynchronously.
pub fn handle_rpc_request(
&self,
request: Request,
meta: T
) -> FutureRpcResult<S::Future>
[src]
pub fn handle_rpc_request(
&self,
request: Request,
meta: T
) -> FutureRpcResult<S::Future>
Handle deserialized RPC request.
pub fn handle_call(&self, call: Call, meta: T) -> FutureOutput
[src]
pub fn handle_call(&self, call: Call, meta: T) -> FutureOutput
Handle single call asynchronously.
Trait Implementations
impl<M: Debug + Metadata> Debug for IoHandler<M>
[src]
impl<M: Debug + Metadata> Debug for IoHandler<M>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<M: Default + Metadata> Default for IoHandler<M>
[src]
impl<M: Default + Metadata> Default for IoHandler<M>
impl<M: Metadata> Deref for IoHandler<M>
[src]
impl<M: Metadata> Deref for IoHandler<M>
type Target = MetaIoHandler<M>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
fn deref(&self) -> &Self::Target
Dereferences the value.
impl<M: Metadata> DerefMut for IoHandler<M>
[src]
impl<M: Metadata> DerefMut for IoHandler<M>
impl From<IoHandler> for MetaIoHandler<()>
[src]
impl From<IoHandler> for MetaIoHandler<()>