polars_arrow::legacy::utils

Trait 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: FromTrustedLenIterator<Self::Item>>(self) -> T
       where Self: Sized + TrustedLen { ... }
    fn collect_reversed<T: FromIteratorReversed<Self::Item>>(self) -> T
       where Self: Sized + TrustedLen { ... }
}

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: FromTrustedLenIterator<Self::Item>>(self) -> T
where Self: Sized + TrustedLen,

Source

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

Implementors§

Source§

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