pub struct RpcNamespace { /* private fields */ }Expand description
Typed request builder over one JSON-RPC endpoint and parameter mode.
Implementations§
Source§impl RpcNamespace
impl RpcNamespace
Sourcepub fn request<T: DeserializeOwned>(
&self,
method: impl Into<String>,
params: impl Serialize,
) -> Result<PendingRpcRequest<T>>
pub fn request<T: DeserializeOwned>( &self, method: impl Into<String>, params: impl Serialize, ) -> Result<PendingRpcRequest<T>>
Creates a typed request using wire-compatible method and parameters.
Sourcepub fn request_without_params<T: DeserializeOwned>(
&self,
method: impl Into<String>,
) -> PendingRpcRequest<T>
pub fn request_without_params<T: DeserializeOwned>( &self, method: impl Into<String>, ) -> PendingRpcRequest<T>
Creates a typed parameterless request.
Sourcepub fn raw<T: DeserializeOwned>(
&self,
method: impl Into<String>,
params: Option<Value>,
) -> PendingRpcRequest<T>
pub fn raw<T: DeserializeOwned>( &self, method: impl Into<String>, params: Option<Value>, ) -> PendingRpcRequest<T>
Alias for arbitrary methods not yet represented by a convenience method.
Sourcepub fn batch(&self, calls: Vec<RpcBatchCall>) -> Result<PendingRpcBatchRequest>
pub fn batch(&self, calls: Vec<RpcBatchCall>) -> Result<PendingRpcBatchRequest>
Validates and creates one unsplit batch request.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RpcNamespace
impl !UnwindSafe for RpcNamespace
impl Freeze for RpcNamespace
impl Send for RpcNamespace
impl Sync for RpcNamespace
impl Unpin for RpcNamespace
impl UnsafeUnpin for RpcNamespace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more