GroupExt

Trait GroupExt 

Source
pub trait GroupExt {
    // Required method
    fn map<F>(&self, f: F) -> Self
       where F: FnOnce(TokenStream) -> TokenStream;

    // Provided methods
    fn map_tts<F>(&self, f: F) -> Self
       where F: FnMut(TokenTree) -> TokenTree,
             Self: Sized { ... }
    fn flat_map_tts<F, I>(&self, f: F) -> Self
       where F: FnMut(TokenTree) -> I,
             I: IntoIterator<Item = TokenTree>,
             Self: Sized { ... }
}

Required Methods§

Source

fn map<F>(&self, f: F) -> Self

Provided Methods§

Source

fn map_tts<F>(&self, f: F) -> Self
where F: FnMut(TokenTree) -> TokenTree, Self: Sized,

Source

fn flat_map_tts<F, I>(&self, f: F) -> Self
where F: FnMut(TokenTree) -> I, I: IntoIterator<Item = TokenTree>, Self: Sized,

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.

Implementations on Foreign Types§

Source§

impl GroupExt for Group

Source§

fn map<F>(&self, f: F) -> Self

Implementors§