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.
Auto Trait Implementations§
impl<W> Freeze for StreamWriter<W>where
W: Freeze,
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§
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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