pub trait ToTokenBuffer<T: TokenTree> {
    // Required method
    fn extend_token_buffer(&self, token_buffer: &mut TokenBuffer<T>);

    // Provided method
    fn to_token_buffer(&self) -> TokenBuffer<T> { ... }
}
Expand description

Methods for making or extending a TokenBuffer with tokens representing this object. This is automatically implemented for types that implement the IntoTokens trait.

Required Methods§

source

fn extend_token_buffer(&self, token_buffer: &mut TokenBuffer<T>)

Extend the given TokenBuffer with tokens representing this object.

Provided Methods§

source

fn to_token_buffer(&self) -> TokenBuffer<T>

Make a new TokenBuffer with tokens representing this object.

Implementors§

source§

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