Convert to string representation for storage
(&self)
| 36 | impl EntityKind { |
| 37 | /// Convert to string representation for storage |
| 38 | pub fn as_str(&self) -> &'static str { |
| 39 | match self { |
| 40 | EntityKind::Function => "function", |
| 41 | EntityKind::Method => "method", |
| 42 | EntityKind::Class => "class", |
| 43 | EntityKind::Interface => "interface", |
| 44 | EntityKind::TypeAlias => "type_alias", |
| 45 | EntityKind::Const => "const", |
| 46 | EntityKind::Variable => "variable", |
| 47 | EntityKind::Enum => "enum", |
| 48 | EntityKind::Module => "module", |
| 49 | EntityKind::Import => "import", |
| 50 | EntityKind::Export => "export", |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | impl std::str::FromStr for EntityKind { |
no outgoing calls