AsyncRawDataSink

Trait AsyncRawDataSink 

Source
pub trait AsyncRawDataSink {
    // Required methods
    fn sink_str<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        data: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = SinkResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn sink_bytes<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        data: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = SinkResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn sink_str_batch<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        data: Vec<&'life1 str>,
    ) -> Pin<Box<dyn Future<Output = SinkResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn sink_bytes_batch<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        data: Vec<&'life1 [u8]>,
    ) -> Pin<Box<dyn Future<Output = SinkResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for sinking raw data (strings and bytes).

Provides methods for writing unstructured data to a destination. Useful for pass-through scenarios or when data doesn’t need parsing.

Required Methods§

Source

fn sink_str<'life0, 'life1, 'async_trait>( &'life0 mut self, data: &'life1 str, ) -> Pin<Box<dyn Future<Output = SinkResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write a single string payload.

Source

fn sink_bytes<'life0, 'life1, 'async_trait>( &'life0 mut self, data: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = SinkResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write a single byte payload.

Source

fn sink_str_batch<'life0, 'life1, 'async_trait>( &'life0 mut self, data: Vec<&'life1 str>, ) -> Pin<Box<dyn Future<Output = SinkResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write multiple string payloads in batch.

Order of strings should be preserved in the output.

Source

fn sink_bytes_batch<'life0, 'life1, 'async_trait>( &'life0 mut self, data: Vec<&'life1 [u8]>, ) -> Pin<Box<dyn Future<Output = SinkResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write multiple byte payloads in batch.

Order of byte slices should be preserved in the output.

Implementors§