Struct fog_pack::document::VecDocumentBuilder[][src]

pub struct VecDocumentBuilder<I> where
    I: Iterator,
    <I as Iterator>::Item: Serialize
{ /* fields omitted */ }

An iterator adapter for building many Documents.

Frequently, fog-pack’s 1 MiB size limit can pose problems with large data sets. Generally, these data sets can be treated as large arrays of relatively small data objects. This adaptor can take an iterator over any set of data objects, and will produce a series of Documents that are under the size limit.

For the asynchronous version that works on streams, see AsyncVecDocumentBuilder.

Implementations

impl<I> VecDocumentBuilder<I> where
    I: Iterator,
    <I as Iterator>::Item: Serialize
[src]

pub fn new(iter: I, schema: Option<&Hash>) -> Self[src]

pub fn new_ordered(iter: I, schema: Option<&Hash>) -> Self[src]

pub fn compression(self, setting: Option<u8>) -> Self[src]

Override the default compression settings for all produced Documents. None will disable compression. Some(level) will compress with the provided level as the setting for the algorithm.

pub fn sign(self, key: &IdentityKey) -> Self[src]

Sign the all produced documents from this point onward.

Trait Implementations

impl<I: Clone> Clone for VecDocumentBuilder<I> where
    I: Iterator,
    <I as Iterator>::Item: Serialize
[src]

impl<I: Debug> Debug for VecDocumentBuilder<I> where
    I: Iterator,
    <I as Iterator>::Item: Serialize
[src]

impl<I> Iterator for VecDocumentBuilder<I> where
    I: Iterator,
    <I as Iterator>::Item: Serialize
[src]

type Item = Result<NewDocument>

The type of the elements being iterated over.

Auto Trait Implementations

impl<I> !RefUnwindSafe for VecDocumentBuilder<I>

impl<I> !Send for VecDocumentBuilder<I>

impl<I> !Sync for VecDocumentBuilder<I>

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

impl<I> !UnwindSafe for VecDocumentBuilder<I>

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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,