Trait ToTokens

Source
pub trait ToTokens<T: TokenTree> {
    // Required method
    fn to_tokens(&self) -> impl Iterator<Item = T> + '_;
}
Expand description

Trait for getting the token representation of an object.

Required Methods§

Source

fn to_tokens(&self) -> impl Iterator<Item = T> + '_

Get an iterator of tokens representing this object.

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<T: TokenTree> ToTokens<T> for TokenBuf<T>

Source§

impl<T: TokenTree, X: IntoTokens<T> + Clone> ToTokens<T> for X