Get the last string component of this name, if any.
(&self)
| 227 | |
| 228 | /// Get the last string component of this name, if any. |
| 229 | pub fn last_str(&self) -> Option<&str> { |
| 230 | match self.as_data() { |
| 231 | NameData::Str(_, s, _) => Some(s.as_str()), |
| 232 | _ => None, |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | /// Returns a dot-separated human-readable representation of this name. |
| 237 | pub fn pretty(&self) -> String { |
no test coverage detected