pub struct AsyncVecDocumentBuilder<St>{ /* private fields */ }Expand description
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§
Source§impl<St> AsyncVecDocumentBuilder<St>
impl<St> AsyncVecDocumentBuilder<St>
Sourcepub fn new(stream: St, schema: Option<&Hash>) -> Self
pub fn new(stream: St, schema: Option<&Hash>) -> Self
Initialize a new builder, optionally having each document adhering to a schema. When the provided stream returns None, this builder will complete the last document and cease using the iterator.
Sourcepub fn new_ordered(stream: St, schema: Option<&Hash>) -> Self
pub fn new_ordered(stream: St, schema: Option<&Hash>) -> Self
Initialize a new builder, optionally having each document adhering to a schema. When the provided stream returns None, this builder will complete the last document and cease using the iterator.
Unlike new, this requires that the provided serializable
items have all of their fields and subfields lexicographically ordered,
and will fail if that isn’t upheld.
Sourcepub fn compression(self, setting: Option<u8>) -> Self
pub fn compression(self, setting: Option<u8>) -> Self
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.
Sourcepub fn sign(self, key: &IdentityKey) -> Self
pub fn sign(self, key: &IdentityKey) -> Self
Sign the all produced documents from this point onward.
Trait Implementations§
Source§impl<St> Debug for AsyncVecDocumentBuilder<St>
impl<St> Debug for AsyncVecDocumentBuilder<St>
Source§impl<St> FusedStream for AsyncVecDocumentBuilder<St>
impl<St> FusedStream for AsyncVecDocumentBuilder<St>
Source§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
true if the stream should no longer be polled.