pub fn find_one_identifier(&self, name: &str) -> Result<Option<Token<String>>> {
        if let Some(t) = self.find_one(name)? {
            if let Value::Identifier(ref identifier) = t.inner {
                return Ok(Some(Token::new(identifier.clone(), t.pos.clone())));
            } else {
                return Err(Error::pos("expected identifier".to_owned(), t.pos.clone()));
            }
        }

        Ok(None)
    }
/// Optionally find exactly one identifier matching the given name.
///
/// This enforces that all found values are identifiers, otherwise the lookup will cause an
/// error.
Optionally find exactly one identifier matching the given name.
This enforces that all found values are identifiers, otherwise the lookup will cause an
error.
Optionally find exactly one identifier matching the given name . This enforces that all found values are identifiers otherwise the lookup will cause an error .
pub fn find_one_identifier(&self, name: &str) -> Result<Option<Token<String>>> {
        if let Some(t) = self.find_one(name)? {
            if let Value::Identifier(ref identifier) = t.inner {
                return Ok(Some(Token::new(identifier.clone(), t.pos.clone())));
            } else {
                return Err(Error::pos("expected identifier".to_owned(), t.pos.clone()));
            }
        }
        Ok(None)
    }
pub fn find_one_identifier ( & self , name : & str ) -> Result < Option < Token < String > > > { if let Some ( t ) = self . find_one ( name ) ? { if let Value :: Identifier ( ref identifier ) = t . inner { return Ok ( Some ( Token :: new ( identifier . clone ( ) , t . pos . clone ( ) ) ) ) ; } else { return Err ( Error :: pos ( " " . to_owned ( ) , t . pos . clone ( ) ) ) ; } } Ok ( None ) }
Optionally find exactly one identifier matching the given name.
Optionally find exactly one identifier matching the given name .
&self
name
&str
&self
name
&str