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§
- AsPath
Iter - Iterator over
Asns in anAsPathView, expandingAS_SETsegments on the fly. - AsPath
View - Zero-allocation borrowed view over an element’s effective
AS_PATH. - Asns
Iter - Iterator over originating
Asns fromAsnsView. - Asns
View - Zero-allocation view over the originating ASNs of an element’s
AS_PATH. - Bgp4
MpUpdate - A BGP4MP UPDATE message with associated metadata.
- Communities
Iter - Iterator over all
MetaCommunityitems in wire attribute order. - Communities
View - Borrowed view over an element’s BGP community attributes (
COMMUNITIES,EXTENDED_COMMUNITIES,IPV6_ADDRESS_SPECIFIC_EXTENDED_COMMUNITIES, andLARGE_COMMUNITIES). - Diagnostic
Iterator - Iterator over record-level parsing diagnostics.
- Dissecting
Diagnostic Iterator - Iterator produced by
DiagnosticIterator::with_dissection. - ElemRef
- Borrowed view over a single BGP element inside a
RecordElemsbatch. - Elem
RefIter - Iterator over borrowed
ElemRefs within a singleRecordElemsrecord. - Fallible
Route Iterator - Fallible
Update Iterator - Fallible iterator over BGP announcements that returns parsing errors.
- Filtered
RawRecord Iterator - Iterator over raw MRT records with record-level filter semantics applied.
- Legacy
BgpUpdate - A deprecated MRT Type 5 BGP_UPDATE message with endpoint metadata.
- RawRecord
Iterator - Record
Elems - A borrowed batch of elements from one MRT record.
- Recovering
Elem Iterator - Iterator over BGP elements and explicit recovery gaps.
- Recovering
Record Iterator - Iterator over parsed MRT records and explicit recovery gaps.
- Recovery
Config - Settings for opt-in MRT framing recovery.
- Recovery
Error - A framing error for which no recovery boundary was found within the scan window, an I/O failure, or unsupported input.
- Recovery
Gap - A byte range discarded while restoring MRT record framing.
- Route
Iterator - Table
Dump V2Entry - A TableDumpV2 RIB entry with associated metadata.
- Update
Iterator - Iterator over BGP announcements from MRT data.
Enums§
- Diagnostic
Event - A record-level parsing outcome for malformed-data investigation.
- Dissected
Diagnostic Event - A record-level diagnostic with a full dissection tree attached.
- MrtUpdate
- Unified enum representing BGP announcements from different MRT message types.
- Recovery
Event - An item produced by a recovering iterator.
- Recovery
Evidence - 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.