pub enum IdentOrLiteral {
Ident(Ident),
Literal(usize),
}Expand description
For struct fields, they can either be identifiers (my_struct.foo)
or literals (my_struct.2) — for tuple structs.
Variants§
Trait Implementations§
Source§impl Clone for IdentOrLiteral
impl Clone for IdentOrLiteral
Source§fn clone(&self) -> IdentOrLiteral
fn clone(&self) -> IdentOrLiteral
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ToTokens for IdentOrLiteral
impl ToTokens for IdentOrLiteral
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 Freeze for IdentOrLiteral
impl RefUnwindSafe for IdentOrLiteral
impl !Send for IdentOrLiteral
impl !Sync for IdentOrLiteral
impl Unpin for IdentOrLiteral
impl UnwindSafe for IdentOrLiteral
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)