use std::future::Future;
use std::io;
use futures_core::Stream;
use minarrow::{Field, SuperTable, Table};
pub trait TransportReader: Stream<Item = io::Result<Table>> + Sized {
fn read_all_tables(self) -> impl Future<Output = io::Result<Vec<Table>>> + Send;
fn read_tables(self, n: Option<usize>) -> impl Future<Output = io::Result<Vec<Table>>> + Send;
fn read_to_super_table(
self,
name: Option<String>,
n: Option<usize>,
) -> impl Future<Output = io::Result<SuperTable>> + Send;
fn combine_to_table(
self,
name: Option<String>,
) -> impl Future<Output = io::Result<Table>> + Send;
fn schema(&self) -> Option<&[Field]>;
fn read_next(&mut self) -> impl Future<Output = io::Result<Option<Table>>> + Send;
}