Trait AsyncMessage

Source
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§