diff --git a/src/bgp/types.rs b/src/bgp/types.rs index 427a6820..33830b8f 100644 --- a/src/bgp/types.rs +++ b/src/bgp/types.rs @@ -283,6 +283,12 @@ impl From for Origin { } } +impl std::fmt::Display for Origin { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) + } +} + /// Wrapper for the 4 byte Multi-Exit Discriminator in path attributes. #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]