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.
Auto Trait Implementations§
impl<W> Freeze for FileWriter<W>where
W: Freeze,
impl<W> !RefUnwindSafe for FileWriter<W>
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>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more