diff --git a/src/bgp/nlri/afisafi.rs b/src/bgp/nlri/afisafi.rs index 0e5abc1..7f6ced2 100644 --- a/src/bgp/nlri/afisafi.rs +++ b/src/bgp/nlri/afisafi.rs @@ -246,6 +246,7 @@ paste! { #[derive(Clone, Debug, Hash)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] + #[cfg_attr(feature = "bincode", derive(bincode::Decode, bincode::Encode))] pub enum Nlri { $($( [<$afi_name $safi_name>]([<$afi_name $safi_name Nlri>]$(<$gen>)?), @@ -522,27 +523,6 @@ impl Nlri<&[u8]> { } } -#[cfg(feature = "bincode")] -impl bincode::Encode for Nlri { - fn encode(&self, encoder: &mut E) -> Result<(), bincode::error::EncodeError> { - todo!() - } -} - -#[cfg(feature = "bincode")] -impl bincode::Decode for Nlri { - fn decode(decoder: &mut D) -> Result { - todo!() - } -} - -#[cfg(feature = "bincode")] -impl<'de, Octs: Octets> bincode::BorrowDecode<'de> for Nlri { - fn borrow_decode>(decoder: &mut D) -> Result { - todo!() - } -} - //------------ Traits --------------------------------------------------------- /// A type characterized by an AFI and SAFI.