Trait taos_query::tmq::AsyncMessage
source · pub trait AsyncMessage {
type Error;
// 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 = Result<RawData, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_meta<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<RawMeta>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fetch_raw_block<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<RawBlock>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Associated Types§
Required Methods§
sourcefn as_raw_data<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RawData, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn as_raw_data<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<RawData, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return raw data as bytes.
sourcefn get_meta<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Option<RawMeta>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_meta<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Option<RawMeta>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Extract meta message.