pub enum CodegenIdentUsage<'a> {
Module(UniqueIdent<'a>),
Type(UniqueIdent<'a>),
Field(UniqueIdent<'a>),
Variant(UniqueIdent<'a>),
Param(UniqueIdent<'a>),
Method(UniqueIdent<'a>),
}Expand description
Emits a UniqueIdent as an idiomatic Rust identifier.
Each CodegenIdentUsage variant determines the case transformation
applied to the identifier: module, field, parameter, and method names
become snake_case; type and enum variant names become PascalCase.
Implements ToTokens for use in quote macros. For string interpolation,
use display.
Variants§
Module(UniqueIdent<'a>)
Type(UniqueIdent<'a>)
Field(UniqueIdent<'a>)
Variant(UniqueIdent<'a>)
Param(UniqueIdent<'a>)
Method(UniqueIdent<'a>)
Implementations§
Source§impl<'a> CodegenIdentUsage<'a>
impl<'a> CodegenIdentUsage<'a>
Trait Implementations§
Source§impl<'a> Clone for CodegenIdentUsage<'a>
impl<'a> Clone for CodegenIdentUsage<'a>
Source§fn clone(&self) -> CodegenIdentUsage<'a>
fn clone(&self) -> CodegenIdentUsage<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for CodegenIdentUsage<'a>
Source§impl<'a> Debug for CodegenIdentUsage<'a>
impl<'a> Debug for CodegenIdentUsage<'a>
Source§impl IdentFragment for CodegenIdentUsage<'_>
impl IdentFragment for CodegenIdentUsage<'_>
Source§impl ToTokens for CodegenIdentUsage<'_>
impl ToTokens for CodegenIdentUsage<'_>
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl<'a> Freeze for CodegenIdentUsage<'a>
impl<'a> RefUnwindSafe for CodegenIdentUsage<'a>
impl<'a> Send for CodegenIdentUsage<'a>
impl<'a> Sync for CodegenIdentUsage<'a>
impl<'a> Unpin for CodegenIdentUsage<'a>
impl<'a> UnsafeUnpin for CodegenIdentUsage<'a>
impl<'a> UnwindSafe for CodegenIdentUsage<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.