pub struct MockStream<I> { /* private fields */ }
Expand description

A simple struct that helps create RowStreams from vectors.

Implementations

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

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

Formats the value using the given formatter. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Must return headers as they are in this point of the chain. For example if implementor adds a column, its headers() function must return the new headers including the one just added. Read more

Add a column to each row of the stream. Read more

Deletes the specified columns from each row of the stream. If you have too many columns to delete perhaps instead use RowStream::select. Read more

Outputs only the selected columns, ignoring the rest. Read more

Adds a column to each row of the stream using a closure to compute its value. Read more

Reduce all the incoming stream into one row, computing some aggregates in the way. All the stream collapses into one row. Read more

Groups rows by the given criteria, but assuming a “group” is a set of adjacent rows. Read more

Groups rows by the given criteria. You’ll be given a RowStream instance as the first argument of a closure that you can use to further process the grouped rows. Read more

When consumed, writes to destination specified by the column given in the first argument. Other than that this behaves like an id(x) function so you can specify more links in the chain and even more flushers. Read more

Mostly for debugging, calls a closure on each element. Behaves like the identity function on the stream returning each row untouched. Read more

Renames some columns

Apply a function to every row and use the return values to build the row stream. Read more

Apply a function to a single column of the stream, this function dones’t fail if the column dones’t exist. Read more

filter entire rows out depending on one column’s value and a condition, leaving errored rows untouched. Read more

filter entire rows out depending on one column’s value and a condition, leaving errored rows untouched. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.