pub struct StreamWriter<W> where
W: Write, { /* private fields */ }
This is supported on crate feature
io_ipc
only.Expand description
Arrow stream writer
The data written by this writer must be read in order. To signal that no more
data is arriving through the stream call self.finish()
;
For a usage walkthrough consult this example.
Implementations
sourceimpl<W> StreamWriter<W> where
W: Write,
impl<W> StreamWriter<W> where
W: Write,
sourcepub fn new(writer: W, write_options: WriteOptions) -> StreamWriter<W>
pub fn new(writer: W, write_options: WriteOptions) -> StreamWriter<W>
Creates a new StreamWriter
sourcepub fn start(
&mut self,
schema: &Schema,
ipc_fields: Option<Vec<IpcField, Global>>
) -> Result<(), ArrowError>
pub fn start(
&mut self,
schema: &Schema,
ipc_fields: Option<Vec<IpcField, Global>>
) -> Result<(), ArrowError>
Starts the stream by writing a Schema message to it.
Use ipc_fields
to declare dictionary ids in the schema, for dictionary-reuse
sourcepub fn write(
&mut self,
columns: &Chunk<Arc<dyn Array + 'static>>,
ipc_fields: Option<&[IpcField]>
) -> Result<(), ArrowError>
pub fn write(
&mut self,
columns: &Chunk<Arc<dyn Array + 'static>>,
ipc_fields: Option<&[IpcField]>
) -> Result<(), ArrowError>
Writes Chunk
to the stream
sourcepub fn finish(&mut self) -> Result<(), ArrowError>
pub fn finish(&mut self) -> Result<(), ArrowError>
Write continuation bytes, and mark the stream as done
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consumes itself, returning the inner writer.
Auto Trait Implementations
impl<W> !RefUnwindSafe for StreamWriter<W>
impl<W> Send for StreamWriter<W> where
W: Send,
impl<W> Sync for StreamWriter<W> where
W: Sync,
impl<W> Unpin for StreamWriter<W> where
W: Unpin,
impl<W> !UnwindSafe for StreamWriter<W>
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