Struct jsonrpc_client_transports::TypedClient [−][src]
pub struct TypedClient(_);
Expand description
Client for typed JSON RPC requests
Implementations
pub fn call_method<T: Serialize, R: DeserializeOwned>(
&self,
method: &str,
returns: &str,
args: T
) -> impl Future<Output = RpcResult<R>>
pub fn call_method<T: Serialize, R: DeserializeOwned>(
&self,
method: &str,
returns: &str,
args: T
) -> impl Future<Output = RpcResult<R>>
Call RPC with serialization of request and deserialization of response.
Call RPC with serialization of request only.
pub fn subscribe<T: Serialize, R: DeserializeOwned + 'static>(
&self,
subscribe: &str,
subscribe_params: T,
topic: &str,
unsubscribe: &str,
returns: &'static str
) -> RpcResult<TypedSubscriptionStream<R>>
pub fn subscribe<T: Serialize, R: DeserializeOwned + 'static>(
&self,
subscribe: &str,
subscribe_params: T,
topic: &str,
unsubscribe: &str,
returns: &'static str
) -> RpcResult<TypedSubscriptionStream<R>>
Subscribe with serialization of request and deserialization of response.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for TypedClient
impl Send for TypedClient
impl Sync for TypedClient
impl Unpin for TypedClient
impl !UnwindSafe for TypedClient
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V