pub trait IdentFragment {
// Required method
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>;
// Provided method
fn span(&self) -> Option<Span> { ... }
}Expand description
Specialized formatting trait used by format_ident!.
Ident arguments formatted using this trait will have their r# prefix
stripped, if present.
See format_ident! for more information.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl IdentFragment for String
impl IdentFragment for String
Source§impl<T> IdentFragment for &Twhere
T: IdentFragment + ?Sized,
impl<T> IdentFragment for &Twhere
T: IdentFragment + ?Sized,
Source§impl<T> IdentFragment for &mut Twhere
T: IdentFragment + ?Sized,
impl<T> IdentFragment for &mut Twhere
T: IdentFragment + ?Sized,
Source§impl<T> IdentFragment for Cow<'_, T>
impl<T> IdentFragment for Cow<'_, T>
Implementors§
impl IdentFragment for Ident
impl IdentFragment for Index
Available on crate feature
printing only.impl IdentFragment for Member
Available on crate feature
printing only.