(value: &str)
| 1799 | impl TryFrom<&str> for NetworkPolicyRuleAction { |
| 1800 | type Error = PlanError; |
| 1801 | fn try_from(value: &str) -> Result<Self, Self::Error> { |
| 1802 | match value.to_uppercase().as_str() { |
| 1803 | "ALLOW" => Ok(Self::Allow), |
| 1804 | _ => Err(PlanError::Unstructured( |
| 1805 | "Allow is the only valid option".into(), |
| 1806 | )), |
| 1807 | } |
| 1808 | } |
| 1809 | } |
| 1810 | |
| 1811 | #[derive(Debug, Clone, Serialize, PartialEq, Eq, Ord, PartialOrd, Hash)] |