Skip to main content

ParallelTransportWriter

Trait ParallelTransportWriter 

Source
pub trait ParallelTransportWriter {
    // Required methods
    fn schema(&self) -> &[Field];
    fn stream_count(&self) -> usize;
    fn write_table(
        &mut self,
        table: impl Into<TableV> + Send,
    ) -> impl Future<Output = Result<()>> + Send;
    fn write_all_tables(
        &mut self,
        tables: Vec<impl Into<TableV> + Send>,
    ) -> impl Future<Output = Result<()>> + Send;
    fn finish(self) -> impl Future<Output = Result<()>> + Send
       where Self: Sized;
}
Expand description

Writes tables across multiple concurrent transport streams.

Required Methods§

Source

fn schema(&self) -> &[Field]

Returns the schema used by all streams.

Source

fn stream_count(&self) -> usize

Returns the number of active streams.

Source

fn write_table( &mut self, table: impl Into<TableV> + Send, ) -> impl Future<Output = Result<()>> + Send

Writes a table to the next stream in round-robin order.

Source

fn write_all_tables( &mut self, tables: Vec<impl Into<TableV> + Send>, ) -> impl Future<Output = Result<()>> + Send

Writes all tables, distributing them across the available streams.

Source

fn finish(self) -> impl Future<Output = Result<()>> + Send
where Self: Sized,

Flushes and closes all streams.

Returns the first error encountered while completing a stream.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§