Intent lifecycle strings (vault_intent_*) ↔ the proto entity status.
(status: &str)
| 90 | |
| 91 | /// Intent lifecycle strings (vault_intent_*) ↔ the proto entity status. |
| 92 | pub fn intent_status_to_proto(status: &str) -> Option<pb::VaultEntityStatus> { |
| 93 | match status { |
| 94 | "backlog" => Some(pb::VaultEntityStatus::Backlog), |
| 95 | "in_progress" => Some(pb::VaultEntityStatus::InProgress), |
| 96 | "needs-review" => Some(pb::VaultEntityStatus::NeedsReview), |
| 97 | "done" | "completed" => Some(pb::VaultEntityStatus::Done), |
| 98 | "planned" => Some(pb::VaultEntityStatus::Planned), |
| 99 | "icebox" => Some(pb::VaultEntityStatus::Suspended), |
| 100 | _ => None, |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | pub fn intent_status_from_proto(status: pb::VaultEntityStatus) -> Option<&'static str> { |
| 105 | match status { |
no outgoing calls
no test coverage detected