pub trait AsyncMessage {
    // Required methods
    fn has_meta(&self) -> bool;
    fn has_data(&self) -> bool;
    fn as_raw_data<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = RawResult<RawData>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_meta<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = RawResult<Option<RawMeta>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fetch_raw_block<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = RawResult<Option<RawBlock>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn has_meta(&self) -> bool

Check if the message contains meta.

source

fn has_data(&self) -> bool

Check if the message contains data.

source

fn as_raw_data<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RawResult<RawData>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Return raw data as bytes.

source

fn get_meta<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RawResult<Option<RawMeta>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Extract meta message.

source

fn fetch_raw_block<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RawResult<Option<RawBlock>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§