polars_parquet::parquet

Trait FallibleStreamingIterator

Source
pub trait FallibleStreamingIterator {
    type Item: ?Sized;
    type Error;

Show 21 methods // Required methods fn advance(&mut self) -> Result<(), Self::Error>; fn get(&self) -> Option<&Self::Item>; // Provided methods fn next(&mut self) -> Result<Option<&Self::Item>, Self::Error> { ... } fn size_hint(&self) -> (usize, Option<usize>) { ... } fn all<F>(&mut self, f: F) -> Result<bool, Self::Error> where Self: Sized, F: FnMut(&Self::Item) -> bool { ... } fn any<F>(&mut self, f: F) -> Result<bool, Self::Error> where Self: Sized, F: FnMut(&Self::Item) -> bool { ... } fn by_ref(&mut self) -> &mut Self where Self: Sized { ... } fn count(self) -> Result<usize, Self::Error> where Self: Sized { ... } fn filter<F>(self, f: F) -> Filter<Self, F> where Self: Sized, F: FnMut(&Self::Item) -> bool { ... } fn find<F>(&mut self, f: F) -> Result<Option<&Self::Item>, Self::Error> where Self: Sized, F: FnMut(&Self::Item) -> bool { ... } fn for_each<F>(self, f: F) -> Result<(), Self::Error> where Self: Sized, F: FnMut(&Self::Item) { ... } fn fuse(self) -> Fuse<Self> where Self: Sized { ... } fn map<F, B>(self, f: F) -> Map<Self, F, B> where Self: Sized, F: FnMut(&Self::Item) -> B { ... } fn map_ref<F, B>(self, f: F) -> MapRef<Self, F> where Self: Sized, F: Fn(&Self::Item) -> &B, B: ?Sized { ... } fn map_err<F, B>(self, f: F) -> MapErr<Self, F> where Self: Sized, F: Fn(Self::Error) -> B { ... } fn nth(&mut self, n: usize) -> Result<Option<&Self::Item>, Self::Error> { ... } fn position<F>(&mut self, f: F) -> Result<Option<usize>, Self::Error> where Self: Sized, F: FnMut(&Self::Item) -> bool { ... } fn skip(self, n: usize) -> Skip<Self> where Self: Sized { ... } fn skip_while<F>(self, f: F) -> SkipWhile<Self, F> where Self: Sized, F: FnMut(&Self::Item) -> bool { ... } fn take(self, n: usize) -> Take<Self> where Self: Sized { ... } fn take_while<F>(self, f: F) -> TakeWhile<Self, F> where Self: Sized, F: FnMut(&Self::Item) -> bool { ... }
}
Expand description

A fallible, streaming iterator.

Required Associated Types§

Source

type Item: ?Sized

The type being iterated over.

Source

type Error

The error type of iteration.

Required Methods§

Source

fn advance(&mut self) -> Result<(), Self::Error>

Advances the iterator to the next position.

Iterators start just before the first item, so this method should be called before get when iterating.

The behavior of calling this method after get has returned None, or after this method has returned an error is unspecified.

Source

fn get(&self) -> Option<&Self::Item>

Returns the current element.

The behavior of calling this method before any calls to advance is unspecified.

Provided Methods§

Source

fn next(&mut self) -> Result<Option<&Self::Item>, Self::Error>

Advances the iterator, returning the next element.

The default implementation simply calls advance followed by get.

Source

fn size_hint(&self) -> (usize, Option<usize>)

Returns bounds on the number of remaining elements in the iterator.

Source

fn all<F>(&mut self, f: F) -> Result<bool, Self::Error>
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Determines if all elements of the iterator satisfy a predicate.

Source

fn any<F>(&mut self, f: F) -> Result<bool, Self::Error>
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Determines if any elements of the iterator satisfy a predicate.

Source

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Borrows an iterator, rather than consuming it.

This is useful to allow the application of iterator adaptors while still retaining ownership of the original adaptor.

Source

fn count(self) -> Result<usize, Self::Error>
where Self: Sized,

Returns the number of remaining elements in the iterator.

Source

fn filter<F>(self, f: F) -> Filter<Self, F>
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Returns an iterator which filters elements by a predicate.

Source

fn find<F>(&mut self, f: F) -> Result<Option<&Self::Item>, Self::Error>
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Returns the first element of the iterator which satisfies a predicate.

Source

fn for_each<F>(self, f: F) -> Result<(), Self::Error>
where Self: Sized, F: FnMut(&Self::Item),

Calls a closure on each element of an iterator.

Source

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Returns an iterator which is well-behaved at the beginning and end of iteration.

Source

fn map<F, B>(self, f: F) -> Map<Self, F, B>
where Self: Sized, F: FnMut(&Self::Item) -> B,

Returns an iterator which applies a transform to elements.

Source

fn map_ref<F, B>(self, f: F) -> MapRef<Self, F>
where Self: Sized, F: Fn(&Self::Item) -> &B, B: ?Sized,

Returns an iterator which applies a transform to elements.

Unlike map, the the closure provided to this method returns a reference into the original value.

Source

fn map_err<F, B>(self, f: F) -> MapErr<Self, F>
where Self: Sized, F: Fn(Self::Error) -> B,

Returns an iterator that applies a transform to errors.

Source

fn nth(&mut self, n: usize) -> Result<Option<&Self::Item>, Self::Error>

Returns the nth element of the iterator.

Source

fn position<F>(&mut self, f: F) -> Result<Option<usize>, Self::Error>
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Returns the position of the first element matching a predicate.

Source

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Returns an iterator which skips the first n elements.

Source

fn skip_while<F>(self, f: F) -> SkipWhile<Self, F>
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Returns an iterator which skips the first sequence of elements matching a predicate.

Source

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Returns an iterator which only returns the first n elements.

Source

fn take_while<F>(self, f: F) -> TakeWhile<Self, F>
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Returns an iterator which only returns the first sequence of elements matching a predicate.

Implementations on Foreign Types§

Source§

impl<'a, I> FallibleStreamingIterator for &'a mut I

Source§

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>,

Source§

type Item = O

Source§

type Error = E

Source§

fn advance(&mut self) -> Result<(), E>

Source§

fn get( &self, ) -> Option<&<Decompressor<I, O, F, E, II> as FallibleStreamingIterator>::Item>

Source§

fn size_hint(&self) -> (usize, Option<usize>)

Implementors§

Source§

impl<'a, I, T, E> FallibleStreamingIterator for Convert<'a, I, T>
where I: Iterator<Item = Result<&'a T, E>>,

Source§

type Item = T

Source§

type Error = E

Source§

impl<I> FallibleStreamingIterator for Fuse<I>

Source§

impl<I> FallibleStreamingIterator for Skip<I>

Source§

impl<I> FallibleStreamingIterator for Take<I>

Source§

impl<I, F> FallibleStreamingIterator for Filter<I, F>

Source§

impl<I, F> FallibleStreamingIterator for SkipWhile<I, F>

Source§

impl<I, F> FallibleStreamingIterator for TakeWhile<I, F>

Source§

impl<I, F, B> FallibleStreamingIterator for Map<I, F, B>

Source§

impl<I, F, B> FallibleStreamingIterator for MapErr<I, F>

Source§

impl<I, F, B> FallibleStreamingIterator for MapRef<I, F>

Source§

impl<I: Iterator<Item = ParquetResult<Page>>> FallibleStreamingIterator for Compressor<I>

Source§

impl<T, E> FallibleStreamingIterator for Empty<T, E>

Source§

type Item = T

Source§

type Error = E

Source§

impl<V, E> FallibleStreamingIterator for DynStreamingIterator<'_, V, E>

Source§

type Item = V

Source§

type Error = E