Struct impl_tools_lib::IdentFormatter
source · pub struct IdentFormatter(_);
Expand description
Tool to make a formatted [Ident
]
Implementations§
source§impl IdentFormatter
impl IdentFormatter
sourcepub fn make_call_site(&mut self, args: Arguments<'_>) -> Ident
pub fn make_call_site(&mut self, args: Arguments<'_>) -> Ident
Construct a new [Ident
], using Span::call_site
Example
let mut idfmt = IdentFormatter::new();
let ident = idfmt.make_call_site(format_args!("x{}", 6));
assert_eq!(ident, "x6");