Trait pink_web3::Transport

source ·
pub trait Transport: Clone {
    type Out: Future<Output = Result<Vec<u8>>>;

    // Required method
    fn execute(
        &self,
        method: &'static str,
        params: Vec<&'_ dyn Serialize>
    ) -> Self::Out;
}
Expand description

Transport implementation

Required Associated Types§

source

type Out: Future<Output = Result<Vec<u8>>>

The type of future this transport returns when a call is made.

Required Methods§

source

fn execute( &self, method: &'static str, params: Vec<&'_ dyn Serialize> ) -> Self::Out

Execute remote method with given parameters.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: Transport> Transport for &T

§

type Out = <T as Transport>::Out

source§

fn execute( &self, method: &'static str, params: Vec<&'_ dyn Serialize> ) -> Self::Out

Implementors§