Trait monero_serai::rpc::RpcConnection

source ·
pub trait RpcConnection: Clone + Debug {
    // Required method
    fn post<'life0, 'life1, 'async_trait>(
        &'life0 self,
        route: &'life1 str,
        body: Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

source

fn post<'life0, 'life1, 'async_trait>( &'life0 self, route: &'life1 str, body: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Perform a POST request to the specified route with the specified body.

The implementor is left to handle anything such as authentication.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RpcConnection for HttpRpc

Available on crate feature http-rpc only.