pub struct StreamWriter<W: Write> { /* private fields */ }
Available 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§
source§impl<W: Write> StreamWriter<W>
impl<W: Write> StreamWriter<W>
sourcepub fn new(writer: W, write_options: WriteOptions) -> Self
pub fn new(writer: W, write_options: WriteOptions) -> Self
Creates a new StreamWriter
sourcepub fn start(
&mut self,
schema: &Schema,
ipc_fields: Option<Vec<IpcField>>
) -> Result<()>
pub fn start(
&mut self,
schema: &Schema,
ipc_fields: Option<Vec<IpcField>>
) -> Result<()>
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<Box<dyn Array>>,
ipc_fields: Option<&[IpcField]>
) -> Result<()>
pub fn write(
&mut self,
columns: &Chunk<Box<dyn Array>>,
ipc_fields: Option<&[IpcField]>
) -> Result<()>
Writes Chunk
to the stream
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consumes itself, returning the inner writer.