Struct syn_solidity::SolIdent
source · #[repr(transparent)]pub struct SolIdent(pub Ident);
Expand description
A Solidity identifier.
Tuple Fields§
§0: Ident
Implementations§
source§impl SolIdent
impl SolIdent
pub fn new(s: &str) -> Self
pub fn new_spanned(s: &str, span: Span) -> Self
sourcepub fn as_string(&self) -> String
pub fn as_string(&self) -> String
Returns the identifier as a string, without the r#
prefix if present.
sourcepub fn parse_any(input: ParseStream<'_>) -> Result<Self>
pub fn parse_any(input: ParseStream<'_>) -> Result<Self>
Parses any identifier including keywords.
sourcepub fn peek_any(input: ParseStream<'_>) -> bool
pub fn peek_any(input: ParseStream<'_>) -> bool
Peeks any identifier including keywords.
pub fn parse_opt(input: ParseStream<'_>) -> Result<Option<Self>>
Trait Implementations§
source§impl FromIterator<SolIdent> for SolPath
impl FromIterator<SolIdent> for SolPath
source§impl IdentFragment for SolIdent
impl IdentFragment for SolIdent
source§impl Ord for SolIdent
impl Ord for SolIdent
source§impl PartialEq for SolIdent
impl PartialEq for SolIdent
source§impl PartialOrd for SolIdent
impl PartialOrd for SolIdent
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Spanned for SolIdent
impl Spanned for SolIdent
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.source§impl ToTokens for SolIdent
impl ToTokens for SolIdent
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,
impl Eq for SolIdent
impl StructuralEq for SolIdent
impl StructuralPartialEq for SolIdent
Auto Trait Implementations§
impl RefUnwindSafe for SolIdent
impl !Send for SolIdent
impl !Sync for SolIdent
impl Unpin for SolIdent
impl UnwindSafe for SolIdent
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
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.