IntoTokens

Trait IntoTokens 

Source
pub trait IntoTokens<Item> {
    type Tokens: Tokens<Item = Item>;

    // Required method
    fn into_tokens(self) -> Self::Tokens;
}
Expand description

A trait that is implemented by anything which can be converted into an object implementing the Tokens trait.

Required Associated Types§

Source

type Tokens: Tokens<Item = Item>

The type that will be used to implement the Tokens interface.

Required Methods§

Source

fn into_tokens(self) -> Self::Tokens

Convert self into a type which implements the Tokens interface.

Implementations on Foreign Types§

Source§

impl<'a> IntoTokens<char> for &'a str

Source§

impl<'a, Item> IntoTokens<&'a Item> for &'a [Item]

Source§

type Tokens = SliceTokens<'a, Item>

Source§

fn into_tokens(self) -> Self::Tokens

Implementors§

Source§

impl<'a> IntoTokens<char> for StrTokens<'a>

Source§

impl<'a, Item> IntoTokens<&'a Item> for SliceTokens<'a, Item>

Source§

type Tokens = SliceTokens<'a, Item>

Source§

impl<I> IntoTokens<<I as Iterator>::Item> for IterTokens<I>
where I: Iterator + Clone,