Struct streaming_decompression::Decompressor [−][src]
pub struct Decompressor<I, O, F, E, II> where
I: Compressed,
O: Decompressed,
E: Error,
II: Iterator<Item = Result<I, E>>,
F: Fn(I, &mut Vec<u8>) -> Result<O, E>, { /* fields omitted */ }
Expand description
A FallibleStreamingIterator
that decompresses items of type I
into type O
via an
internal Vec<u8>
that is re-used across items.
The purpose of this streaming iterator is to be able to decompress parts of an item I
into O
.
Implementations
impl<I, O, F, E, II> Decompressor<I, O, F, E, II> where
I: Compressed,
O: Decompressed,
E: Error,
II: Iterator<Item = Result<I, E>>,
F: Fn(I, &mut Vec<u8>) -> Result<O, E>,
impl<I, O, F, E, II> Decompressor<I, O, F, E, II> where
I: Compressed,
O: Decompressed,
E: Error,
II: Iterator<Item = Result<I, E>>,
F: Fn(I, &mut Vec<u8>) -> Result<O, E>,
Returns a new Decompressor
.
Returns its internal buffer, consuming itself.
Trait Implementations
impl<I, O, F, E, II> FallibleStreamingIterator for Decompressor<I, O, F, E, II> where
I: Compressed,
O: Decompressed,
E: Error,
II: Iterator<Item = Result<I, E>>,
F: Fn(I, &mut Vec<u8>) -> Result<O, E>,
impl<I, O, F, E, II> FallibleStreamingIterator for Decompressor<I, O, F, E, II> where
I: Compressed,
O: Decompressed,
E: Error,
II: Iterator<Item = Result<I, E>>,
F: Fn(I, &mut Vec<u8>) -> Result<O, E>,
type Item = O
type Item = O
The type being iterated over.
type Error = E
type Error = E
The error type of iteration.
Returns bounds on the number of remaining elements in the iterator.
Advances the iterator, returning the next element. Read more
Determines if all elements of the iterator satisfy a predicate.
Determines if any elements of the iterator satisfy a predicate.
Returns the number of remaining elements in the iterator.
Returns an iterator which filters elements by a predicate.
Returns the first element of the iterator which satisfies a predicate.
Calls a closure on each element of an iterator.
Returns an iterator which is well-behaved at the beginning and end of iteration.
Returns an iterator which applies a transform to elements.
Returns an iterator which applies a transform to elements. Read more
Returns an iterator that applies a transform to errors.
Returns the nth
element of the iterator.
Returns the position of the first element matching a predicate.
Returns an iterator which skips the first sequence of elements matching a predicate.
Returns an iterator which only returns the first n
elements.