Skip to main content

Module iters

Module iters 

Source
Expand description

Iterator implementations for bgpkit-parser.

This module contains different iterator implementations for parsing BGP data:

  • default: Standard iterators that skip errors (RecordIterator, ElemIterator)
  • fallible: Fallible iterators that return Results (FallibleRecordIterator, FallibleElemIterator)
  • update: Iterators for BGP UPDATE messages (UpdateIterator, FallibleUpdateIterator)
  • route: Route-level iterators (RouteIterator, FallibleRouteIterator)
  • recovery: Iterators that survive damaged MRT framing (RecoveringRecordIterator, RecoveringElemIterator, RecoveryEvent)
  • diagnostic: Per-record dissection and validation reporting (DiagnosticIterator, DissectingDiagnosticIterator)
  • raw: Raw MRT records with their original bytes (RawRecordIterator, FilteredRawRecordIterator)

It also contains the trait implementations that enable BgpkitParser to be used with Rust’s iterator syntax.

Re-exports§

pub use default::ElemIterator;
pub use default::RecordIterator;
pub use fallible::FallibleElemIterator;
pub use fallible::FallibleRecordIterator;

Modules§

default
Default iterator implementations that skip errors and return successfully parsed items.
fallible
Fallible iterator implementations that return Results, exposing parsing errors to users.

Structs§

AsPathIter
Iterator over Asns in an AsPathView, expanding AS_SET segments on the fly.
AsPathView
Zero-allocation borrowed view over an element’s effective AS_PATH.
AsnsIter
Iterator over originating Asns from AsnsView.
AsnsView
Zero-allocation view over the originating ASNs of an element’s AS_PATH.
Bgp4MpUpdate
A BGP4MP UPDATE message with associated metadata.
CommunitiesIter
Iterator over all MetaCommunity items in wire attribute order.
CommunitiesView
Borrowed view over an element’s BGP community attributes (COMMUNITIES, EXTENDED_COMMUNITIES, IPV6_ADDRESS_SPECIFIC_EXTENDED_COMMUNITIES, and LARGE_COMMUNITIES).
DiagnosticIterator
Iterator over record-level parsing diagnostics.
DissectingDiagnosticIterator
Iterator produced by DiagnosticIterator::with_dissection.
ElemRef
Borrowed view over a single BGP element inside a RecordElems batch.
ElemRefIter
Iterator over borrowed ElemRefs within a single RecordElems record.
FallibleRouteIterator
FallibleUpdateIterator
Fallible iterator over BGP announcements that returns parsing errors.
FilteredRawRecordIterator
Iterator over raw MRT records with record-level filter semantics applied.
LegacyBgpUpdate
A deprecated MRT Type 5 BGP_UPDATE message with endpoint metadata.
RawRecordIterator
RecordElems
A borrowed batch of elements from one MRT record.
RecoveringElemIterator
Iterator over BGP elements and explicit recovery gaps.
RecoveringRecordIterator
Iterator over parsed MRT records and explicit recovery gaps.
RecoveryConfig
Settings for opt-in MRT framing recovery.
RecoveryError
A framing error for which no recovery boundary was found within the scan window, an I/O failure, or unsupported input.
RecoveryGap
A byte range discarded while restoring MRT record framing.
RouteIterator
TableDumpV2Entry
A TableDumpV2 RIB entry with associated metadata.
UpdateIterator
Iterator over BGP announcements from MRT data.

Enums§

DiagnosticEvent
A record-level parsing outcome for malformed-data investigation.
DissectedDiagnosticEvent
A record-level diagnostic with a full dissection tree attached.
MrtUpdate
Unified enum representing BGP announcements from different MRT message types.
RecoveryEvent
An item produced by a recovering iterator.
RecoveryEvidence
Evidence used to validate the first record following a recovered gap.

Functions§

record_validation_warnings
Collect the RFC 7606 validation findings of an MRT record.
span_record_warnings
Anchor validation warnings to the byte ranges they concern.