(c: i32)
| 56 | impl TryFrom<i32> for PeerConnectedPeerDirection { |
| 57 | type Error = anyhow::Error; |
| 58 | fn try_from(c: i32) -> Result<PeerConnectedPeerDirection, anyhow::Error> { |
| 59 | match c { |
| 60 | 0 => Ok(PeerConnectedPeerDirection::IN), |
| 61 | 1 => Ok(PeerConnectedPeerDirection::OUT), |
| 62 | o => Err(anyhow::anyhow!("Unknown variant {} for enum PeerConnectedPeerDirection", o)), |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | impl ToString for PeerConnectedPeerDirection { |
nothing calls this directly
no outgoing calls
no test coverage detected