zip_eq

Trait ZipEq

Source
pub trait ZipEq {
    // Required methods
    unsafe fn zip_eq_unchecked<B>(
        self,
        b: B,
    ) -> ZipEqEagerCheck<Self::IntoIter, B::IntoIter> 
       where Self: IntoIterator,
             B: IntoIterator;
    fn zip_eq_eager<B>(
        self,
        b: B,
    ) -> ZipEqEagerCheck<Self::IntoIter, B::IntoIter> 
       where Self: IntoIterator,
             Self::IntoIter: TrustedLen + ExactSizeIterator,
             B: IntoIterator,
             B::IntoIter: TrustedLen + ExactSizeIterator;
    fn zip_eq_lazy<B>(self, b: B) -> ZipEqLazyCheck<Self::IntoIter, B::IntoIter> 
       where Self: IntoIterator,
             B: IntoIterator;
}
Expand description

Trait that adds zip_eq_* builder functions to objects that are convertible to iterators

Required Methods§

Source

unsafe fn zip_eq_unchecked<B>( self, b: B, ) -> ZipEqEagerCheck<Self::IntoIter, B::IntoIter>
where Self: IntoIterator, B: IntoIterator,

Returns a zipped iterator without checking that the lengths of the iterators are equal. The behavior is undefined if the iterators don’t have the same length.

Source

fn zip_eq_eager<B>(self, b: B) -> ZipEqEagerCheck<Self::IntoIter, B::IntoIter>

Returns a zipped iterator after checking that the lengths of the iterators are equal.

§Panics

Panics if a.len() != b.len()

Source

fn zip_eq_lazy<B>(self, b: B) -> ZipEqLazyCheck<Self::IntoIter, B::IntoIter>
where Self: IntoIterator, B: IntoIterator,

Returns a zipped iterator without checking that the lengths of the iterators are equal. The lengths are checked during iteration to avoid undefined behavior.
In the case where the lengths are different, the behavior is unspecified and may result in panics, but will not cause undefined behavior.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§