Trait polars_core::utils::CustomIterTools

source ·
pub trait CustomIterTools: Iterator {
    // Provided methods
    unsafe fn trust_my_length(
        self,
        length: usize
    ) -> TrustMyLength<Self, Self::Item> 
       where Self: Sized { ... }
    fn collect_trusted<T>(self) -> T
       where T: FromTrustedLenIterator<Self::Item>,
             Self: Sized + TrustedLen { ... }
    fn collect_reversed<T>(self) -> T
       where T: FromIteratorReversed<Self::Item>,
             Self: Sized + TrustedLen { ... }
    fn all_equal(&mut self) -> bool
       where Self: Sized,
             Self::Item: PartialEq { ... }
    fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
       where Self: Iterator<Item = Option<A>>,
             F: FnMut(B, A) -> B { ... }
    fn contains<Q>(&mut self, query: &Q) -> bool
       where Self: Sized,
             Self::Item: Borrow<Q>,
             Q: PartialEq { ... }
}

Provided Methods§

source

unsafe fn trust_my_length( self, length: usize ) -> TrustMyLength<Self, Self::Item>
where Self: Sized,

Turn any iterator in a trusted length iterator

§Safety

The given length must be correct.

source

fn collect_trusted<T>(self) -> T
where T: FromTrustedLenIterator<Self::Item>, Self: Sized + TrustedLen,

source

fn collect_reversed<T>(self) -> T
where T: FromIteratorReversed<Self::Item>, Self: Sized + TrustedLen,

source

fn all_equal(&mut self) -> bool
where Self: Sized, Self::Item: PartialEq,

source

fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
where Self: Iterator<Item = Option<A>>, F: FnMut(B, A) -> B,

source

fn contains<Q>(&mut self, query: &Q) -> bool
where Self: Sized, Self::Item: Borrow<Q>, Q: PartialEq,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> CustomIterTools for T
where T: Iterator + ?Sized,