Struct parquet2::write::FileStreamer
source · [−]pub struct FileStreamer<W: AsyncWrite + Unpin + Send> { /* private fields */ }
Expand description
An interface to write a parquet file asynchronously.
Use start
to write the header, write
to write a row group,
and end
to write the footer.
Implementations
sourceimpl<W: AsyncWrite + Unpin + Send> FileStreamer<W>
impl<W: AsyncWrite + Unpin + Send> FileStreamer<W>
sourcepub fn options(&self) -> &WriteOptions
pub fn options(&self) -> &WriteOptions
The options assigned to the file
sourcepub fn schema(&self) -> &SchemaDescriptor
pub fn schema(&self) -> &SchemaDescriptor
The SchemaDescriptor
assigned to this file
sourceimpl<W: AsyncWrite + Unpin + Send> FileStreamer<W>
impl<W: AsyncWrite + Unpin + Send> FileStreamer<W>
sourcepub fn new(
writer: W,
schema: SchemaDescriptor,
options: WriteOptions,
created_by: Option<String>
) -> Self
pub fn new(
writer: W,
schema: SchemaDescriptor,
options: WriteOptions,
created_by: Option<String>
) -> Self
Returns a new FileStreamer
.
sourcepub async fn write<E>(
&mut self,
row_group: RowGroupIter<'_, E>,
num_rows: usize
) -> Result<()> where
ParquetError: From<E>,
E: Error,
pub async fn write<E>(
&mut self,
row_group: RowGroupIter<'_, E>,
num_rows: usize
) -> Result<()> where
ParquetError: From<E>,
E: Error,
Writes a row group to the file.
Auto Trait Implementations
impl<W> RefUnwindSafe for FileStreamer<W> where
W: RefUnwindSafe,
impl<W> Send for FileStreamer<W>
impl<W> Sync for FileStreamer<W> where
W: Sync,
impl<W> Unpin for FileStreamer<W>
impl<W> UnwindSafe for FileStreamer<W> where
W: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more