Skip to main content

FilterIterator

Enum FilterIterator 

Source
pub(crate) enum FilterIterator<M, I> {
    Materialized(M),
    Lazy(I),
}
Expand description

Holds either materialized rows or a lazy iterator.

This does not implement Iterator on purpose. Callers use Self::for_each or Self::try_for_each so the enum is matched once before the loop, not once per row in next.

Variants§

§

Materialized(M)

§

Lazy(I)

Implementations§

Source§

impl<M, I> FilterIterator<M, I>
where M: Iterator, I: Iterator<Item = M::Item>,

Source

pub(crate) fn for_each<F>(self, f: F)
where F: FnMut(M::Item),

Source

pub(crate) fn try_for_each<F, E>(self, f: F) -> Result<(), E>
where F: FnMut(M::Item) -> Result<(), E>,

Auto Trait Implementations§

§

impl<M, I> Freeze for FilterIterator<M, I>
where M: Freeze, I: Freeze,

§

impl<M, I> RefUnwindSafe for FilterIterator<M, I>

§

impl<M, I> Send for FilterIterator<M, I>
where M: Send, I: Send,

§

impl<M, I> Sync for FilterIterator<M, I>
where M: Sync, I: Sync,

§

impl<M, I> Unpin for FilterIterator<M, I>
where M: Unpin, I: Unpin,

§

impl<M, I> UnsafeUnpin for FilterIterator<M, I>
where M: UnsafeUnpin, I: UnsafeUnpin,

§

impl<M, I> UnwindSafe for FilterIterator<M, I>
where M: UnwindSafe, I: UnwindSafe,

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V