pub trait Connection<TxInfo, E>: Sync {
    // Required methods
    fn read<'life0, 'async_trait, T>(
        &'life0 self,
        call: ReadCall<T>
    ) -> Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'async_trait>>
       where T: 'async_trait + Decode + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn get_contract_events<'life0, 'async_trait>(
        &'life0 self,
        tx_info: TxInfo
    ) -> Pin<Box<dyn Future<Output = Result<ContractEvents, E>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A read-only connection - can invoke non-mutating methods and fetch events.

Required Methods§

source

fn read<'life0, 'async_trait, T>( &'life0 self, call: ReadCall<T> ) -> Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'async_trait>>
where T: 'async_trait + Decode + Send, Self: 'async_trait, 'life0: 'async_trait,

Perform the given read-only call.

source

fn get_contract_events<'life0, 'async_trait>( &'life0 self, tx_info: TxInfo ) -> Pin<Box<dyn Future<Output = Result<ContractEvents, E>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch all events emitted by contracts in the transaction with the given tx_info.

Object Safety§

This trait is not object safe.

Implementors§