Skip to main content

Crate bgpkit_snap

Crate bgpkit_snap 

Source
Expand description

bgpkit-snap v4: an immutable container for prefix tries.

The container owns framing, identity and integrity. It knows nothing about what a trie holds beyond the value type’s TYPE_ID, and nothing about what a client section means. See docs/format.md.

Re-exports§

pub use header::Entry;
pub use header::Header;
pub use header::StreamRef;
pub use header::ENTRY_LEN;
pub use header::FLAG_STREAM;
pub use header::FLAG_WINDOW;
pub use header::HEADER_LEN;
pub use header::ID_V4;
pub use header::ID_V6;
pub use header::KIND_PAYLOAD;
pub use header::KIND_V4;
pub use header::KIND_V6;
pub use ipnet;
pub use prefix_trie;
pub use rkyv;

Modules§

header
The 192-byte v4 header and the section table.
journal
The journal: one owner of the live tree, the blob arena and the segments.
profile
A second prefix trie inside a profile section, with its own value type.

Structs§

AddressCounts
The answer to Snapshot::address_counts.
ExtraSection
One section the caller supplies next to the tries: an arena, a sidecar, any bytes the profile owns. id is 16 or higher, kind is a four-byte tag, and required makes a reader that does not implement the id refuse the object.
Opts
Everything a writer declares about the object.
Owned
The same queries Snapshot answers, returning values you own.
SectionRef
One section as a validator sees it: the table row and where its bytes are.
Snapshot
An immutable object, validated once and then queried in memory.
SnapshotView
What a validator may inspect when an object is opened.
TreeId
The identity of the tree a journal writes.
Writer
Builds one object in memory, then writes it in one piece.

Enums§

Count
How much of an address space a tree’s entries cover.
Error
Every way this crate refuses.

Traits§

Codec
Decode a value from archived bytes, used by the journal.
SnapValue
A value type that can live in a trie.
Validator
Profile-side validation, run once at open before any value is handed out.

Functions§

recorded_counts
How many entries an object records, without naming a value type.
verify_bytes
Container-level verification that needs no value type: header, layout, section table, trailing bytes and the content id. What it cannot check is that a section body is a valid archive of its declared type; a reader with the type does that on open.

Type Aliases§

HighSer
The serializer rkyv::to_bytes builds, so the value bound can name it.