[−][src]Struct avrow::WriterBuilder
Convenient builder struct for configuring and instantiating a Writer.
Implementations
impl<'a, W: Write> WriterBuilder<'a, W>
[src]
pub fn new() -> Self
[src]
Creates a builder instance to construct a Writer
pub fn set_metadata(self, k: &str, v: &str) -> Self
[src]
Set any custom metadata for the datafile.
pub fn set_codec(self, codec: Codec) -> Self
[src]
Set one of the available codec. This requires the respective code feature flags to be enabled.
pub fn set_schema(self, schema: &'a Schema) -> Self
[src]
Provide the writer with a reference to the schema file
pub fn set_datafile(self, w: W) -> Self
[src]
Set the underlying output stream. This can be anything which implements the Write trait.
pub fn set_flush_interval(self, interval: usize) -> Self
[src]
Set the flush interval (bytes) for the internal block buffer. It's the amount of bytes post which the internal buffer is written to the underlying datafile. Defaults to DEFAULT_FLUSH_INTERVAL.
pub fn build(self) -> Result<Writer<'a, W>, AvrowErr>
[src]
Builds the Writer instance consuming this builder.
Trait Implementations
Auto Trait Implementations
impl<'a, W> RefUnwindSafe for WriterBuilder<'a, W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<'a, W> Send for WriterBuilder<'a, W> where
W: Send,
W: Send,
impl<'a, W> Sync for WriterBuilder<'a, W> where
W: Sync,
W: Sync,
impl<'a, W> Unpin for WriterBuilder<'a, W> where
W: Unpin,
W: Unpin,
impl<'a, W> UnwindSafe for WriterBuilder<'a, W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,