Trait ParseAsIdent

Source
pub trait ParseAsIdent {
    // Required methods
    fn parse_as_ident(&self) -> Result<Ident>;
    fn parse_as_named_ident<S: AsRef<str>>(
        &self,
        name: S,
        ignore_case: bool,
    ) -> Result<Ident>;
}

Required Methods§

Source

fn parse_as_ident(&self) -> Result<Ident>

Source

fn parse_as_named_ident<S: AsRef<str>>( &self, name: S, ignore_case: bool, ) -> Result<Ident>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ParseAsIdent for ParseBuffer<'_>

Source§

fn parse_as_named_ident<S: AsRef<str>>( &self, name: S, ignore_case: bool, ) -> Result<Ident>

Source§

fn parse_as_ident(&self) -> Result<Ident>

Source§

impl ParseAsIdent for ParseStream<'_>

Source§

fn parse_as_named_ident<S: AsRef<str>>( &self, name: S, ignore_case: bool, ) -> Result<Ident>

Source§

fn parse_as_ident(&self) -> Result<Ident>

Implementors§