Struct re_arrow2::io::ipc::write::StreamWriter

source ·
pub struct StreamWriter<W: Write> { /* private fields */ }
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>

source

pub fn new(writer: W, write_options: WriteOptions) -> Self

Creates a new StreamWriter

source

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

source

pub fn write( &mut self, columns: &Chunk<Box<dyn Array>>, ipc_fields: Option<&[IpcField]> ) -> Result<()>

Writes Chunk to the stream

source

pub fn finish(&mut self) -> Result<()>

Write continuation bytes, and mark the stream as done

source

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.