Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable AfiSafiType optionally coming from a field on a NLRI struct #52

Closed
wants to merge 3 commits into from

Conversation

density215
Copy link
Member

@density215 density215 commented Mar 26, 2024

I can't impl AfiSafi and IsNlri for BasicNlri, because the relevant methods don't take &self:

pub struct BasicNlri {
    pub ty: AfiSafiType,
    pub prefix: Prefix,
    pub path_id: Option<PathId>,
}

impl routecore::bgp::nlri::afisafi::IsNlri for BasicNlri {
     fn nlri_type() -> NlriType {
         todo!()
     }   
 }

 impl routecore::bgp::nlri::afisafi::AfiSafi for BasicNlri {
     fn afi() -> routecore::bgp::types::Afi {
         todo!()
     }
     fn afi_safi() -> AfiSafiType {
         todo!()
     }
 }

This PR fixes that.

@density215 density215 requested a review from DRiKE March 26, 2024 13:09
@density215 density215 closed this Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant