DLIterFamily

Trait DLIterFamily 

Source
pub unsafe trait DLIterFamily {
    type LengthType: UInt;
    type Iter<L: Term<Type = Self::LengthType>>: DLIter<LengthType = Self::LengthType, Family = Self, Length = L>;
    type Item;

    // Required methods
    fn next<L: Term<Type = Self::LengthType>>(
        iter: Self::Iter<Succ<L>>,
        value: Value<L>,
    ) -> (Self::Iter<L>, Self::Item);
    fn finish(iter: Self::Iter<Zero<Self::LengthType>>);

    // Provided method
    fn equiv<L1: Term<Type = Self::LengthType>, L2: Term<Type = Self::LengthType>>(
        _: ValueEq<L1, L2>,
    ) -> Equiv<Self::Iter<L1>, Self::Iter<L2>> { ... }
}
Expand description

SAFETY: You must either implement equiv yourself, or Iter must be transmutable to/from Iter where L and L2 are value-eq. This means it should be #[repr(C)] or #[repr(transparent)] or ZST

Required Associated Types§

Source

type LengthType: UInt

Source

type Iter<L: Term<Type = Self::LengthType>>: DLIter<LengthType = Self::LengthType, Family = Self, Length = L>

Source

type Item

Required Methods§

Source

fn next<L: Term<Type = Self::LengthType>>( iter: Self::Iter<Succ<L>>, value: Value<L>, ) -> (Self::Iter<L>, Self::Item)

Source

fn finish(iter: Self::Iter<Zero<Self::LengthType>>)

Provided Methods§

Source

fn equiv<L1: Term<Type = Self::LengthType>, L2: Term<Type = Self::LengthType>>( _: ValueEq<L1, L2>, ) -> Equiv<Self::Iter<L1>, Self::Iter<L2>>

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§

Source§

impl<'a, T, LT: UInt> DLIterFamily for DSliceIterFamily<'a, T, LT>

Source§

type LengthType = LT

Source§

type Iter<L: Term<Type = Self::LengthType>> = DSliceIter<'a, T, L>

Source§

type Item = &'a T

Source§

impl<'a, T, LT: UInt> DLIterFamily for DSliceIterMutFamily<'a, T, LT>

Source§

type LengthType = LT

Source§

type Iter<L: Term<Type = Self::LengthType>> = DSliceIterMut<'a, T, L>

Source§

type Item = &'a mut T

Source§

impl<I: Iterator, LT: UInt, U: Unreachable> DLIterFamily for DIterBridgeFamily<I, LT, U>

Source§

type LengthType = LT

Source§

type Item = <I as Iterator>::Item

Source§

type Iter<L: Term<Type = Self::LengthType>> = DIterBridge<I, L, U>