Trait IntoSequence

Source
pub trait IntoSequence {
    type Item;
    type Sequence: Sequence<Item = Self::Item>;

    // Required method
    fn into_sequence(self) -> Self::Sequence;
}
Expand description

Represents a type that can be converted into a sequence.

The motivation behind this trait is to avoid directly implementing Sequence for builtin types, which could lead to ambiguities for end users because of method name collisions.

Required Associated Types§

Source

type Item

Source

type Sequence: Sequence<Item = Self::Item>

Required Methods§

Source

fn into_sequence(self) -> Self::Sequence

Converts self into a sequence.

Implementors§