Trait Request

Source
pub trait Request {
    // Required method
    fn request<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        method: &'life1 str,
        params: RpcParams,
    ) -> Pin<Box<dyn Future<Output = Result<R>> + 'async_trait>>
       where R: 'async_trait + DeserializeOwned,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait to be implemented by the ws-client for sending rpc requests and extrinsic.

Required Methods§

Source

fn request<'life0, 'life1, 'async_trait, R>( &'life0 self, method: &'life1 str, params: RpcParams, ) -> Pin<Box<dyn Future<Output = Result<R>> + 'async_trait>>
where R: 'async_trait + DeserializeOwned, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sends a RPC request to the substrate node and returns the answer as string.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§