(s: &str)
| 56 | type Err = (); |
| 57 | |
| 58 | fn from_str(s: &str) -> Result<Self, Self::Err> { |
| 59 | match s { |
| 60 | "function" => Ok(EntityKind::Function), |
| 61 | "method" => Ok(EntityKind::Method), |
| 62 | "class" => Ok(EntityKind::Class), |
| 63 | "interface" => Ok(EntityKind::Interface), |
| 64 | "type_alias" => Ok(EntityKind::TypeAlias), |
| 65 | "const" => Ok(EntityKind::Const), |
| 66 | "variable" => Ok(EntityKind::Variable), |
| 67 | "enum" => Ok(EntityKind::Enum), |
| 68 | "module" => Ok(EntityKind::Module), |
| 69 | "import" => Ok(EntityKind::Import), |
| 70 | "export" => Ok(EntityKind::Export), |
| 71 | _ => Err(()), |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | impl std::fmt::Display for EntityKind { |
nothing calls this directly
no outgoing calls
no test coverage detected