(self)
| 17 | |
| 18 | impl MemoryCategory { |
| 19 | pub const fn as_str(self) -> &'static str { |
| 20 | match self { |
| 21 | Self::General => "general", |
| 22 | Self::UserPref => "user_pref", |
| 23 | Self::Project => "project", |
| 24 | Self::Tool => "tool", |
| 25 | Self::Decision => "decision", |
| 26 | Self::CodeArea => "code_area", |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | pub fn from_proposal_label(value: &str) -> Result<Self, ParseMemoryCategoryError> { |
| 31 | if let Ok(category) = value.parse::<Self>() { |
no outgoing calls