[][src]Struct csvsc::MockStream

pub struct MockStream<I> { /* fields omitted */ }

A simple struct that helps create RowStreams from vectors.

Implementations

impl<I> MockStream<I> where
    I: Iterator<Item = RowResult>, 
[src]

pub fn new(iter: I, headers: Headers) -> MockStream<I>[src]

Creates a new object implementing the RowStream trait from an iterator and some headers.

pub fn from_rows(iter: I) -> Result<MockStream<I>, BuildError>[src]

Creates a new object implementing the RowStream trait from an iterator of RowResult objects, the first of which must be the header row.

Trait Implementations

impl<I: Debug> Debug for MockStream<I>[src]

impl<I> IntoIterator for MockStream<I> where
    I: Iterator<Item = RowResult>, 
[src]

type Item = RowResult

The type of the elements being iterated over.

type IntoIter = IntoIter<I>

Which kind of iterator are we turning this into?

impl<I> RowStream for MockStream<I> where
    MockStream<I>: IntoIterator<Item = RowResult>, 
[src]

Auto Trait Implementations

impl<I> RefUnwindSafe for MockStream<I> where
    I: RefUnwindSafe

impl<I> Send for MockStream<I> where
    I: Send

impl<I> Sync for MockStream<I> where
    I: Sync

impl<I> Unpin for MockStream<I> where
    I: Unpin

impl<I> UnwindSafe for MockStream<I> where
    I: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.