pub trait FormatWrite: Send + Sync {
// Required methods
fn file_extension(&self) -> &'static str;
fn write<'life0, 'async_trait>(
&'life0 self,
writer: Box<dyn FileWriter>,
batches: BatchStream,
) -> Pin<Box<dyn Future<Output = Result<u64, TransferredError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Encodes Arrow batches into a file’s bytes.
Required Methods§
Sourcefn file_extension(&self) -> &'static str
fn file_extension(&self) -> &'static str
File extension for written parts, no dot (e.g. "parquet").
Sourcefn write<'life0, 'async_trait>(
&'life0 self,
writer: Box<dyn FileWriter>,
batches: BatchStream,
) -> Pin<Box<dyn Future<Output = Result<u64, TransferredError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write<'life0, 'async_trait>(
&'life0 self,
writer: Box<dyn FileWriter>,
batches: BatchStream,
) -> Pin<Box<dyn Future<Output = Result<u64, TransferredError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Write all batches into one open sink. Returns the row count written.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".