pub struct FileWriter<W: Write> { /* private fields */ }
Expand description
Arrow file writer
Implementations§
source§impl<R: Read + Seek + Write> FileWriter<R>
impl<R: Read + Seek + Write> FileWriter<R>
sourcepub fn try_from_file(
writer: R,
metadata: FileMetadata,
options: WriteOptions
) -> Result<FileWriter<R>>
pub fn try_from_file( writer: R, metadata: FileMetadata, options: WriteOptions ) -> Result<FileWriter<R>>
Creates a new FileWriter
from an existing file, seeking to the last message
and appending new messages afterwards. Users call finish
to write the footer (with both)
the existing and appended messages on it.
§Error
This function errors iff:
- the file’s endianess is not the native endianess (not yet supported)
- the file is not a valid Arrow IPC file
source§impl<W: Write> FileWriter<W>
impl<W: Write> FileWriter<W>
sourcepub fn try_new(
writer: W,
schema: Schema,
ipc_fields: Option<Vec<IpcField>>,
options: WriteOptions
) -> Result<Self>
pub fn try_new( writer: W, schema: Schema, ipc_fields: Option<Vec<IpcField>>, options: WriteOptions ) -> Result<Self>
Creates a new FileWriter
and writes the header to writer
sourcepub fn new(
writer: W,
schema: Schema,
ipc_fields: Option<Vec<IpcField>>,
options: WriteOptions
) -> Self
pub fn new( writer: W, schema: Schema, ipc_fields: Option<Vec<IpcField>>, options: WriteOptions ) -> Self
Creates a new FileWriter
.
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consumes itself into the inner writer
sourcepub fn get_scratches(&mut self) -> EncodedData
pub fn get_scratches(&mut self) -> EncodedData
Get the inner memory scratches so they can be reused in a new writer. This can be utilized to save memory allocations for performance reasons.
sourcepub fn set_scratches(&mut self, scratches: EncodedData)
pub fn set_scratches(&mut self, scratches: EncodedData)
Set the inner memory scratches so they can be reused in a new writer. This can be utilized to save memory allocations for performance reasons.
sourcepub fn start(&mut self) -> Result<()>
pub fn start(&mut self) -> Result<()>
Writes the header and first (schema) message to the file.
§Errors
Errors if the file has been started or has finished.