Struct parquet2::write::FileWriter
source · [−]pub struct FileWriter<W: Write> { /* private fields */ }
Expand description
An interface to write a parquet file.
Use start
to write the header, write
to write a row group,
and end
to write the footer.
Implementations
sourceimpl<W: Write> FileWriter<W>
impl<W: Write> FileWriter<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: Write> FileWriter<W>
impl<W: Write> FileWriter<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 FileWriter
.
sourcepub fn write<E>(
&mut self,
row_group: RowGroupIter<'_, E>,
num_rows: usize
) -> Result<()> where
ParquetError: From<E>,
E: Error,
pub 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.
This call is IO-bounded
Auto Trait Implementations
impl<W> RefUnwindSafe for FileWriter<W> where
W: RefUnwindSafe,
impl<W> Send for FileWriter<W> where
W: Send,
impl<W> Sync for FileWriter<W> where
W: Sync,
impl<W> Unpin for FileWriter<W> where
W: Unpin,
impl<W> UnwindSafe for FileWriter<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