Trait RuntimeApi

Source
pub trait RuntimeApi {
    type Hash;

    // Required methods
    fn runtime_call<'life0, 'life1, 'async_trait, V>(
        &'life0 self,
        method: &'life1 str,
        data: Vec<Vec<u8>>,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<V>> + 'async_trait>>
       where V: 'async_trait + Decode,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn opaque_runtime_call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        method: &'life1 str,
        data: Vec<Vec<u8>>,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn rpc_call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        method: &'life1 str,
        data: Option<Bytes>,
        at_block: Option<Self::Hash>,
    ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn runtime_call<'life0, 'life1, 'async_trait, V>( &'life0 self, method: &'life1 str, data: Vec<Vec<u8>>, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<V>> + 'async_trait>>
where V: 'async_trait + Decode, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query a runtime api call with automatic decoding to the expected return type.

Source

fn opaque_runtime_call<'life0, 'life1, 'async_trait>( &'life0 self, method: &'life1 str, data: Vec<Vec<u8>>, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query a raw runtime api call without decoding.

Source

fn rpc_call<'life0, 'life1, 'async_trait>( &'life0 self, method: &'life1 str, data: Option<Bytes>, at_block: Option<Self::Hash>, ) -> Pin<Box<dyn Future<Output = Result<Bytes>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, Client> RuntimeApi for RuntimeApiClient<T, Client>
where T: Config, Client: Request,

Source§

type Hash = <T as Config>::Hash