Parse the LanceDB stored status value.
(value: &str)
| 24 | impl TaskStatus { |
| 25 | /// Parse the LanceDB stored status value. |
| 26 | pub fn parse(value: &str) -> Option<Self> { |
| 27 | match value { |
| 28 | "pending" => Some(Self::Pending), |
| 29 | "approved" => Some(Self::Approved), |
| 30 | "running" => Some(Self::Running), |
| 31 | "done" => Some(Self::Done), |
| 32 | "failed" => Some(Self::Failed), |
| 33 | "rejected" => Some(Self::Rejected), |
| 34 | _ => None, |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | /// String representation matching the LanceDB stored value. |
| 39 | pub fn as_str(self) -> &'static str { |
nothing calls this directly
no outgoing calls
no test coverage detected