pub trait Converter<T: Read + Send>: Sized {
// Required methods
fn new(options: ConvertionOptions) -> Self;
fn entry_details(&self) -> impl Iterator<Item = (FormatKind, &EntryDetails)>;
fn options(&self) -> &ConvertionOptions;
fn add_visitor(
&mut self,
visitor: Visitor,
path: PathBuf,
size: u64,
reader: T,
) -> Result<()>;
fn convert(
self,
writer: impl Write + Send,
channel: RecordBatchChannel,
) -> Result<()>;
// Provided methods
fn add_paths(
&mut self,
paths: impl IntoIterator<Item = PathBuf>,
channel: &RecordBatchChannel,
) -> Result<()>
where Self: Converter<BufReader<File>> { ... }
fn add_readers(
&mut self,
readers: impl IntoIterator<Item = (PathBuf, u64, T)>,
channel: &RecordBatchChannel,
) -> Result<()> { ... }
}
Required Methods§
fn new(options: ConvertionOptions) -> Self
fn entry_details(&self) -> impl Iterator<Item = (FormatKind, &EntryDetails)>
fn options(&self) -> &ConvertionOptions
fn add_visitor( &mut self, visitor: Visitor, path: PathBuf, size: u64, reader: T, ) -> Result<()>
fn convert( self, writer: impl Write + Send, channel: RecordBatchChannel, ) -> Result<()>
Provided Methods§
fn add_paths( &mut self, paths: impl IntoIterator<Item = PathBuf>, channel: &RecordBatchChannel, ) -> Result<()>
fn add_readers( &mut self, readers: impl IntoIterator<Item = (PathBuf, u64, T)>, channel: &RecordBatchChannel, ) -> Result<()>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.