pub struct MergeDecoder<D> { /* private fields */ }Expand description
Merges the DBN decoding streams from one or more other decoders. Both metadata and the record streams are merged.
Implementations§
Source§impl<D> Decoder<D>where
D: DbnMetadata + DecodeRecordRef,
impl<D> Decoder<D>where
D: DbnMetadata + DecodeRecordRef,
Sourcepub fn new(decoders: Vec<D>) -> Result<Self>
pub fn new(decoders: Vec<D>) -> Result<Self>
Creates a new merge decoder from the given decoders. Both the DBN metadata and
the records will be merged.
§Errors
This function returns an error if decoders is empty. Errors can also result from
failing to merge the DBN metadata. It will also return an error if one of the
inner decoders returns an error while decoding the first record. A decoder
returning Ok(None) does not result in a failure.
Trait Implementations§
Source§impl<D> DbnMetadata for Decoder<D>
impl<D> DbnMetadata for Decoder<D>
Source§impl<D> DecodeRecord for Decoder<D>where
D: LastRecord + DecodeRecordRef,
impl<D> DecodeRecord for Decoder<D>where
D: LastRecord + DecodeRecordRef,
Source§impl<D> DecodeRecordRef for Decoder<D>where
D: LastRecord + DecodeRecordRef,
impl<D> DecodeRecordRef for Decoder<D>where
D: LastRecord + DecodeRecordRef,
Source§impl<D> DecodeStream for Decoder<D>where
D: LastRecord + DecodeRecordRef,
impl<D> DecodeStream for Decoder<D>where
D: LastRecord + DecodeRecordRef,
Source§fn decode_stream<T: HasRType>(self) -> StreamIterDecoder<Self, T>where
Self: Sized,
fn decode_stream<T: HasRType>(self) -> StreamIterDecoder<Self, T>where
Self: Sized,
Converts the decoder into a streaming iterator of records of type
T. This
lazily decodes the data.Auto Trait Implementations§
impl<D> Freeze for Decoder<D>
impl<D> RefUnwindSafe for Decoder<D>where
D: RefUnwindSafe,
impl<D> Send for Decoder<D>where
D: Send,
impl<D> Sync for Decoder<D>where
D: Sync,
impl<D> Unpin for Decoder<D>where
D: Unpin,
impl<D> UnsafeUnpin for Decoder<D>
impl<D> UnwindSafe for Decoder<D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more