pub type ExampleWriter<W> = RecordWriter<Example, W>;
Expand description

Alias to RecordWriter which input record type Example.

Aliased Type§

struct ExampleWriter<W> { /* private fields */ }

Implementations§

source§

impl<T> RecordWriter<T, BufWriter<File>>where T: Record,

source

pub fn create<P>(path: P) -> Result<Self>where P: AsRef<Path>,

Build a writer writing to a new file.

source§

impl<T, W> RecordWriter<T, W>where T: Record, W: Write,

source

pub fn from_writer(writer: W) -> Result<Self>

Build a writer from a writer with Write trait.

source

pub fn send(&mut self, record: T) -> Result<()>

Write a record.

The method is enabled if the underlying writer implements Write.

source

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

Flush the output stream.

Trait Implementations§

source§

impl<T, W: Clone> Clone for RecordWriter<T, W>where T: Record + Clone,

source§

fn clone(&self) -> RecordWriter<T, W>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T, W: Debug> Debug for RecordWriter<T, W>where T: Record + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T, W: Hash> Hash for RecordWriter<T, W>where T: Record + Hash,

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T, W: PartialEq> PartialEq<RecordWriter<T, W>> for RecordWriter<T, W>where T: Record + PartialEq,

source§

fn eq(&self, other: &RecordWriter<T, W>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T, W: Eq> Eq for RecordWriter<T, W>where T: Record + Eq,

source§

impl<T, W> StructuralEq for RecordWriter<T, W>where T: Record,

source§

impl<T, W> StructuralPartialEq for RecordWriter<T, W>where T: Record,