Struct route_verification_ir::intermediate_repr::Ir
source · pub struct Ir {
pub aut_nums: BTreeMap<u32, AutNum>,
pub as_sets: BTreeMap<String, AsSet>,
pub route_sets: BTreeMap<String, RouteSet>,
pub peering_sets: BTreeMap<String, PeeringSet>,
pub filter_sets: BTreeMap<String, FilterSet>,
pub as_routes: BTreeMap<u32, Vec<IpNet>>,
}
Expand description
Parsed RPSL intermediate representation.
Fields§
§aut_nums: BTreeMap<u32, AutNum>
§as_sets: BTreeMap<String, AsSet>
§route_sets: BTreeMap<String, RouteSet>
§peering_sets: BTreeMap<String, PeeringSet>
§filter_sets: BTreeMap<String, FilterSet>
§as_routes: BTreeMap<u32, Vec<IpNet>>
The AS numbers with Vec of their routes. https://www.rfc-editor.org/rfc/rfc2622#section-4. Each value should always be sorted.
Implementations§
source§impl Ir
impl Ir
pub fn split_n(self, n: usize) -> Vec<Self>
sourcepub fn split_n_cpus(self) -> Result<Vec<Self>>
pub fn split_n_cpus(self) -> Result<Vec<Self>>
Split self
based on the number of CPU logic cores available × 4,
capped at 128 to avoid issues.
sourcepub fn pal_write<P>(self, directory: P) -> Result<()>
pub fn pal_write<P>(self, directory: P) -> Result<()>
Split self
and write to directory
in parallel.
Non-existent directory
is automatically created;
otherwise, it is assumed empty.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Ir
impl<'de> Deserialize<'de> for Ir
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Ir
impl Ord for Ir
source§impl PartialOrd for Ir
impl PartialOrd for Ir
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Ir
impl StructuralPartialEq for Ir
Auto Trait Implementations§
impl Freeze for Ir
impl RefUnwindSafe for Ir
impl Send for Ir
impl Sync for Ir
impl Unpin for Ir
impl UnwindSafe for Ir
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more