async fn post(
        &self,
        message: impl serde::Serialize,
    ) -> Result<serde_json::Value, failure::Error> {
        let reply: Output = self.post_raw(message).await?;

        let ret = match reply {
            Output::Success(v) => v.result,
            Output::Failure(v) => failure::bail!("RPC error: {}", v.error),
        };

        Ok(ret)
    }
/// Performs a POST query to the JSON RPC endpoint,
/// and decodes the response, returning the decoded `serde_json::Value`.
/// `Ok` is returned only for successful calls, for any kind of error
/// the `Err` variant is returned (including the failed RPC method
/// execution response).
Performs a POST query to the JSON RPC endpoint,
and decodes the response, returning the decoded `serde_json::Value`.
`Ok` is returned only for successful calls, for any kind of error
the `Err` variant is returned (including the failed RPC method
execution response).
Performs a POST query to the JSON RPC endpoint and decodes the response returning the decoded ` serde_json :: Value ` . ` Ok ` is returned only for successful calls for any kind of error the ` Err ` variant is returned ( including the failed RPC method execution response ) .
async fn post(
        &self,
        message: impl serde::Serialize,
    ) -> Result<serde_json::Value, failure::Error> {
        let reply: Output = self.post_raw(message).await?;
        let ret = match reply {
            Output::Success(v) => v.result,
            Output::Failure(v) => failure::bail!("RPC error: {}", v.error),
        };
        Ok(ret)
    }
async fn post ( & self , message : impl serde :: Serialize , ) -> Result < serde_json :: Value , failure :: Error > { let reply : Output = self . post_raw ( message ) . await ? ; let ret = match reply { Output :: Success ( v ) => v . result , Output :: Failure ( v ) => failure :: bail ! ( " " v error ) , } ; Ok ( ret ) }
Performs a POST query to the JSON RPC endpoint,
and decodes the response, returning the decoded `serde_json::Value`.
Performs a POST query to the JSON RPC endpoint and decodes the response returning the decoded ` serde_json :: Value ` .
&self
message
impl serde::Serialize