/// Identify the kind of the path.
Identify the kind of the path.
Identify the kind of the path .
pub fn as_kind(&self) -> Option<PathKind> {
        if self.rest.is_empty() && self.trailing.is_none() && self.global.is_none() {
            match self.first {
                PathSegment::SelfValue(..) => Some(PathKind::SelfValue),
                PathSegment::Ident(ident) => Some(PathKind::Ident(ident)),
                _ => None,
            }
        } else {
            None
        }
    }
pub fn as_kind ( & self ) -> Option < PathKind > { if self . rest . is_empty ( ) && self . trailing . is_none ( ) && self . global . is_none ( ) { match self . first { PathSegment :: SelfValue ( .. ) => Some ( PathKind :: SelfValue ) , PathSegment :: Ident ( ident ) => Some ( PathKind :: Ident ( ident ) ) , _ => None , } } else { None } }
Identify the kind of the path.
Identify the kind of the path .
&self