Struct fog_pack::document::AsyncVecDocumentBuilder[][src]

#[must_use = "streams do nothing unless polled"]pub struct AsyncVecDocumentBuilder<St> where
    St: Stream,
    St::Item: Serialize
{ /* fields omitted */ }

An stream 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 a stream over any set of data objects, and will produce a series of Documents that are under the size limit.

For the synchronous version that works on iterators, see AsyncVecDocumentBuilder.

Implementations

impl<St> AsyncVecDocumentBuilder<St> where
    St: Stream,
    St::Item: Serialize
[src]

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

pub fn new_ordered(stream: St, 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<St> Debug for AsyncVecDocumentBuilder<St> where
    St: Stream + Debug,
    St::Item: Serialize + Debug
[src]

impl<St> FusedStream for AsyncVecDocumentBuilder<St> where
    St: Stream + FusedStream,
    St::Item: Serialize
[src]

impl<St> Stream for AsyncVecDocumentBuilder<St> where
    St: Stream,
    St::Item: Serialize
[src]

type Item = Result<NewDocument>

Values yielded by the stream.

impl<'__pin, St> Unpin for AsyncVecDocumentBuilder<St> where
    __Origin<'__pin, St>: Unpin,
    St: Stream,
    St::Item: Serialize
[src]

Auto Trait Implementations

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> Same<T> for T

type Output = T

Should always be Self

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<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

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