pub trait PrefixReadOps: StrideBase {
// Required methods
fn prefix_bitset(&self) -> &Bitset256;
fn lookup_index(&self, idx: BaseIndex) -> Option<(BaseIndex, &Self::T)>;
fn get_prefix_exact(&self, idx: BaseIndex) -> Option<&Self::T>;
// Provided method
fn prefix_count(&self) -> usize { ... }
}Expand description
Read-only operations on prefixes stored in nodes.
Required Methods§
Sourcefn prefix_bitset(&self) -> &Bitset256
fn prefix_bitset(&self) -> &Bitset256
Get a reference to the prefix bitset.
Sourcefn lookup_index(&self, idx: BaseIndex) -> Option<(BaseIndex, &Self::T)>
fn lookup_index(&self, idx: BaseIndex) -> Option<(BaseIndex, &Self::T)>
Lookup the prefix value that covers the given index.
Sourcefn get_prefix_exact(&self, idx: BaseIndex) -> Option<&Self::T>
fn get_prefix_exact(&self, idx: BaseIndex) -> Option<&Self::T>
Get a reference to the prefix value that matches the given index exactly.
Provided Methods§
Sourcefn prefix_count(&self) -> usize
fn prefix_count(&self) -> usize
Get the number of prefixes in this node.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".