pmutil

Trait IdentExt

Source
pub trait IdentExt {
    // Required method
    fn new_ident_with<F, S>(&self, map: F) -> Ident
       where F: for<'a> FnOnce(&'a str) -> S,
             S: AsRef<str>;
}
Expand description

Extension trait for syn::Ident.

Required Methods§

Source

fn new_ident_with<F, S>(&self, map: F) -> Ident
where F: for<'a> FnOnce(&'a str) -> S, S: AsRef<str>,

Creates a new ident with same span by applying map to self.

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 IdentExt for Ident

Source§

fn new_ident_with<F, S>(&self, map: F) -> Ident
where F: for<'a> FnOnce(&'a str) -> S, S: AsRef<str>,

Creates a new ident with same span by applying map to self.

Implementors§