pub trait RouteSampler {
// Required method
fn sample<P: Prefix, Q, Ospf: OspfImpl>(
&mut self,
net: &Network<P, Q, Ospf>,
) -> impl IntoIterator<Item = (RouterId, usize)>;
}Expand description
A function samples route preferences.
Required Methods§
Sourcefn sample<P: Prefix, Q, Ospf: OspfImpl>(
&mut self,
net: &Network<P, Q, Ospf>,
) -> impl IntoIterator<Item = (RouterId, usize)>
fn sample<P: Prefix, Q, Ospf: OspfImpl>( &mut self, net: &Network<P, Q, Ospf>, ) -> impl IntoIterator<Item = (RouterId, usize)>
Return an iterator of routes to advertise. Each item should be a tuple of RouterId (the router that advertises the route) and the AS path length that should be advertised from that router.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.