pub async fn request<'a, T: DeserializeOwned + std::fmt::Debug>(
        &self,
        method: &str,
        params: &[JsonValue],
    ) -> Result<T, Error> {
        let params = params.into();
        let data = match self {
            Self::WebSocket(inner) => {
                inner.request(method, params).await.map_err(Into::into)
            }
            Self::Http(inner) => inner.request(method, params).await.map_err(Into::into),
            #[cfg(feature = "client")]
            Self::Subxt(inner) => inner.request(method, params).await.map_err(Into::into),
        };
        log::debug!("{}: {:?}", method, data);
        data
    }
/// Start a JSON-RPC request.
Start a JSON-RPC request.
Start a JSON - RPC request .
pub async fn request<'a, T: DeserializeOwned + std::fmt::Debug>(
        &self,
        method: &str,
        params: &[JsonValue],
    ) -> Result<T, Error> {
        let params = params.into();
        let data = match self {
            Self::WebSocket(inner) => {
                inner.request(method, params).await.map_err(Into::into)
            }
            Self::Http(inner) => inner.request(method, params).await.map_err(Into::into),
            #[cfg(feature = "client")]
            Self::Subxt(inner) => inner.request(method, params).await.map_err(Into::into),
        };
        log::debug!("{}: {:?}", method, data);
        data
    }
pub async fn request < ' a , T : DeserializeOwned + std :: fmt :: Debug > ( & self , method : & str , params : & [ JsonValue ] , ) -> Result < T , Error > { let params = params . into ( ) ; let data = match self { Self :: WebSocket ( inner ) => { inner . request ( method , params ) . await . map_err ( Into :: into ) } Self :: Http ( inner ) => inner . request ( method , params ) . await . map_err ( Into :: into ) , # [ cfg ( feature " " ) ] Self :: Subxt ( inner ) => inner . request ( method , params ) . await . map_err ( Into :: into ) , } ; log :: debug ! ( " " method data ) ; data }
Start a JSON-RPC request.
Start a JSON - RPC request .
&self
method
&str
params
&[JsonValue]
&self
method
&str
params
&[JsonValue]