Skip to content

Commit

Permalink
Fix bincode for Nlri
Browse files Browse the repository at this point in the history
  • Loading branch information
density215 committed Jun 8, 2024
1 parent dac6774 commit bbc5fac
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/bgp/nlri/afisafi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Octs> {
$($(
[<$afi_name $safi_name>]([<$afi_name $safi_name Nlri>]$(<$gen>)?),
Expand Down Expand Up @@ -522,27 +523,6 @@ impl Nlri<&[u8]> {
}
}

#[cfg(feature = "bincode")]
impl<Octs: Octets> bincode::Encode for Nlri<Octs> {
fn encode<E: bincode::enc::Encoder>(&self, encoder: &mut E) -> Result<(), bincode::error::EncodeError> {
todo!()
}
}

#[cfg(feature = "bincode")]
impl<Octs: Octets> bincode::Decode for Nlri<Octs> {
fn decode<D: bincode::de::Decoder>(decoder: &mut D) -> Result<Self, bincode::error::DecodeError> {
todo!()
}
}

#[cfg(feature = "bincode")]
impl<'de, Octs: Octets> bincode::BorrowDecode<'de> for Nlri<Octs> {
fn borrow_decode<D: bincode::de::BorrowDecoder<'de>>(decoder: &mut D) -> Result<Self, bincode::error::DecodeError> {
todo!()
}
}

//------------ Traits ---------------------------------------------------------

/// A type characterized by an AFI and SAFI.
Expand Down

0 comments on commit bbc5fac

Please sign in to comment.