| 18 | } |
| 19 | |
| 20 | pub trait DefaultPort { |
| 21 | fn default_port(&self) -> Option<u16>; |
| 22 | } |
| 23 | |
| 24 | pub fn parse_enum<E: FromStr + Into<i32>>(name: &str) -> Result<i32> { |
| 25 | let proto = E::from_str(name).map_err(|_| anyhow!("Invalid enum: {}", name))?; |
nothing calls this directly
no outgoing calls
no test coverage detected