pub trait Sequence: Sized {
    const CARDINALITY: usize;

    // Required methods
    fn next(&self) -> Option<Self>;
    fn previous(&self) -> Option<Self>;
    fn first() -> Option<Self>;
    fn last() -> Option<Self>;
}
Expand description

Trait to iterate over the values of a type.

The crate root defines useful functions to work with types implementing Sequence.

Derivation

Sequence can be derived for enum and struct types. Specifically, it can be derived for:

  • Enumerations whose variants meet one of the following criteria:
    • The variant does not have fields.
    • The variant has fields meeting all these conditions:
      • Every field has a type that implements Sequence.
      • Every field but the last one has a type that implements Clone.
  • Enumerations without variants.
  • Structures whose fields meet all these conditions:
    • Every field has a type that implements Sequence.
    • Every field but the last one has a type that implements Clone.
  • Unit structures (i.e. without fields).

The cardinality (number of values) of the type must not exceed usize::MAX.

Laws

T: Sequence implies the following assertions:

  • T::first().and_then(|x| x.previous()).is_none()
  • T::last().and_then(|x| x.next()).is_none()
  • T::first().is_none()T::last().is_none()
  • std::iter::successors(T::first(), T::next) must eventually yield T::last().

Examples

C-like enumeration

use enum_iterator::{all, cardinality, Sequence};

#[derive(Clone, Copy, Debug, PartialEq, Sequence)]
enum Direction { North, South, West, East }

assert_eq!(cardinality::<Direction>(), 4);
assert_eq!(all::<Direction>().collect::<Vec<_>>(), [
    Direction::North,
    Direction::South,
    Direction::West,
    Direction::East,
]);

Enumeration with data

use enum_iterator::{all, cardinality, Sequence};

#[derive(Clone, Copy, Debug, PartialEq, Sequence)]
enum Direction { North, South, West, East }

#[derive(Clone, Copy, Debug, PartialEq, Sequence)]
enum Greeting {
    Hi,
    Bye,
}

#[derive(Clone, Copy, Debug, PartialEq, Sequence)]
enum Action {
    Move(Direction),
    Jump,
    Talk { greeting: Greeting, loud: bool },
}

assert_eq!(cardinality::<Action>(), 4 + 1 + 2 * 2);
assert_eq!(all::<Action>().collect::<Vec<_>>(), [
    Action::Move(Direction::North),
    Action::Move(Direction::South),
    Action::Move(Direction::West),
    Action::Move(Direction::East),
    Action::Jump,
    Action::Talk { greeting: Greeting::Hi, loud: false },
    Action::Talk { greeting: Greeting::Hi, loud: true },
    Action::Talk { greeting: Greeting::Bye, loud: false },
    Action::Talk { greeting: Greeting::Bye, loud: true },
]);

Structure

use enum_iterator::{all, cardinality, Sequence};

#[derive(Clone, Copy, Debug, PartialEq, Sequence)]
enum Side {
    Left,
    Right,
}

#[derive(Clone, Copy, Debug, PartialEq, Sequence)]
enum LimbKind {
    Arm,
    Leg,
}

#[derive(Debug, PartialEq, Sequence)]
struct Limb {
    kind: LimbKind,
    side: Side,
}

assert_eq!(cardinality::<Limb>(), 4);
assert_eq!(all::<Limb>().collect::<Vec<_>>(), [
    Limb { kind: LimbKind::Arm, side: Side::Left },
    Limb { kind: LimbKind::Arm, side: Side::Right },
    Limb { kind: LimbKind::Leg, side: Side::Left },
    Limb { kind: LimbKind::Leg, side: Side::Right },
]);

Required Associated Constants§

source

const CARDINALITY: usize

Number of values of type Self.

Example
use enum_iterator::Sequence;

#[derive(Sequence)]
enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }

assert_eq!(Day::CARDINALITY, 7);

Required Methods§

source

fn next(&self) -> Option<Self>

Returns value following *self or None if this was the end.

Values are yielded in the following order. Comparisons between values are based on their relative order as yielded by next; an element yielded after another is considered greater.

  • For primitive types, in increasing order (same as Ord).
  • For arrays and tuples, in lexicographic order of the sequence of their elements.
  • When derived for an enumeration, in variant definition order.
  • When derived for a structure, in lexicographic order of the sequence of its fields taken in definition order.

The order described above is the same as Ord if any custom Sequence implementation follows Ord and any enumeration has its variants defined in increasing order of discriminant.

Example
use enum_iterator::Sequence;

#[derive(Debug, PartialEq, Sequence)]
enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }

assert_eq!(Day::Tuesday.next(), Some(Day::Wednesday));
source

fn previous(&self) -> Option<Self>

Returns value preceding *self or None if this was the beginning.

Example
use enum_iterator::Sequence;

#[derive(Debug, PartialEq, Sequence)]
enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }

assert_eq!(Day::Wednesday.previous(), Some(Day::Tuesday));
source

fn first() -> Option<Self>

Returns the first value of type Self.

Example
use enum_iterator::Sequence;

#[derive(Debug, PartialEq, Sequence)]
enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }

assert_eq!(Day::first(), Some(Day::Monday));
source

fn last() -> Option<Self>

Returns the last value of type Self.

Example
use enum_iterator::Sequence;

#[derive(Debug, PartialEq, Sequence)]
enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }

assert_eq!(Day::last(), Some(Day::Sunday));

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sequence for Ordering

source§

const CARDINALITY: usize = 3usize

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl Sequence for Infallible

source§

const CARDINALITY: usize = 0usize

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl Sequence for bool

source§

const CARDINALITY: usize = 2usize

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl Sequence for i8

source§

const CARDINALITY: usize = 256usize

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl Sequence for i16

source§

const CARDINALITY: usize = 65_536usize

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl Sequence for u8

source§

const CARDINALITY: usize = 256usize

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl Sequence for u16

source§

const CARDINALITY: usize = 65_536usize

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl Sequence for ()

source§

const CARDINALITY: usize = 1usize

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0> Sequence for (T0,)
where T0: Sequence,

source§

const CARDINALITY: usize = <T0 as Sequence>::CARDINALITY

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1> Sequence for (T0, T1)
where T0: Sequence + Clone, T1: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2> Sequence for (T0, T1, T2)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3> Sequence for (T0, T1, T2, T3)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4> Sequence for (T0, T1, T2, T3, T4)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5> Sequence for (T0, T1, T2, T3, T4, T5)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6> Sequence for (T0, T1, T2, T3, T4, T5, T6)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence + Clone, T24: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence + Clone, T24: Sequence + Clone, T25: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence + Clone, T24: Sequence + Clone, T25: Sequence + Clone, T26: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence + Clone, T24: Sequence + Clone, T25: Sequence + Clone, T26: Sequence + Clone, T27: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence + Clone, T24: Sequence + Clone, T25: Sequence + Clone, T26: Sequence + Clone, T27: Sequence + Clone, T28: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence + Clone, T24: Sequence + Clone, T25: Sequence + Clone, T26: Sequence + Clone, T27: Sequence + Clone, T28: Sequence + Clone, T29: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence + Clone, T24: Sequence + Clone, T25: Sequence + Clone, T26: Sequence + Clone, T27: Sequence + Clone, T28: Sequence + Clone, T29: Sequence + Clone, T30: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31> Sequence for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31)
where T0: Sequence + Clone, T1: Sequence + Clone, T2: Sequence + Clone, T3: Sequence + Clone, T4: Sequence + Clone, T5: Sequence + Clone, T6: Sequence + Clone, T7: Sequence + Clone, T8: Sequence + Clone, T9: Sequence + Clone, T10: Sequence + Clone, T11: Sequence + Clone, T12: Sequence + Clone, T13: Sequence + Clone, T14: Sequence + Clone, T15: Sequence + Clone, T16: Sequence + Clone, T17: Sequence + Clone, T18: Sequence + Clone, T19: Sequence + Clone, T20: Sequence + Clone, T21: Sequence + Clone, T22: Sequence + Clone, T23: Sequence + Clone, T24: Sequence + Clone, T25: Sequence + Clone, T26: Sequence + Clone, T27: Sequence + Clone, T28: Sequence + Clone, T29: Sequence + Clone, T30: Sequence + Clone, T31: Sequence,

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T: Sequence> Sequence for Option<T>

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<T: Sequence> Sequence for Poll<T>

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

source§

impl<const N: usize, T: Sequence + Clone> Sequence for [T; N]

source§

const CARDINALITY: usize = _

source§

fn next(&self) -> Option<Self>

source§

fn previous(&self) -> Option<Self>

source§

fn first() -> Option<Self>

source§

fn last() -> Option<Self>

Implementors§