Skip to main content

Ipv6IndexReader

Struct Ipv6IndexReader 

Source
pub struct Ipv6IndexReader { /* private fields */ }
Expand description

Memory-resident sparse index + sharded LRU block cache for Section 6: Ipv6Index.

Implementations§

Source§

impl Ipv6IndexReader

Source

pub fn parse( backing: &Backing<'_>, section_offset: u64, section_len: u64, cache_blocks: usize, ) -> Result<Self>

Source

pub fn entry_count(&self) -> u64

Source

pub fn block_count(&self) -> u32

Source

pub fn header(&self) -> &IndexHeader

Source

pub fn clear_cache(&self)

Source

pub fn collect_transitions( &self, backing: &Backing<'_>, zstd_dicts: &[(u32, Vec<u8>)], ) -> Result<Vec<(u64, u64)>>

Sequentially decode all IPv6 /64 transitions (start_hi64, record_id) without polluting the LRU cache.

Source

pub fn lookup( &self, backing: &Backing<'_>, zstd_dicts: &[(u32, Vec<u8>)], key: u64, ) -> Result<u64>

Look up upper 64 bits of an IPv6 address, returning record_id (0 = NotFound).

Auto Trait Implementations§

§

impl !Freeze for Ipv6IndexReader

§

impl Forget for Ipv6IndexReader

§

impl Move for Ipv6IndexReader

§

impl RefUnwindSafe for Ipv6IndexReader
where Mutex<LruCache<u32, Arc<DecodedBlockU64>>>: RefUnwindSafe,

§

impl Send for Ipv6IndexReader
where RawVecInner: Send, Mutex<LruCache<u32, Arc<DecodedBlockU64>>>: Send,

§

impl Sync for Ipv6IndexReader
where RawVecInner: Sync, Mutex<LruCache<u32, Arc<DecodedBlockU64>>>: Sync,

§

impl Unpin for Ipv6IndexReader
where *const u8 is !null: Unpin, Align4<u32>: Unpin, Align1<u8>: Unpin, *const u32: Unpin, *const LruEntry<u32, Arc<DecodedBlockU64>> is !null: Unpin, NonZero<usize>: Unpin, *mut LruEntry<u32, Arc<DecodedBlockU64>>: Unpin,

§

impl UnsafeUnpin for Ipv6IndexReader
where *const u8 is !null: UnsafeUnpin, PhantomData<u32>: UnsafeUnpin, PhantomData<u64>: UnsafeUnpin, Align4<u32>: UnsafeUnpin, Align1<u8>: UnsafeUnpin, PhantomData<(KeyRef<u32>, NonNull<LruEntry<u32, Arc<DecodedBlockU64>>>)>: UnsafeUnpin, NonZeroUsizeInner: UnsafeUnpin, *mut LruEntry<u32, Arc<DecodedBlockU64>>: UnsafeUnpin,

§

impl UnwindSafe for Ipv6IndexReader
where RawVecInner: UnwindSafe, Mutex<LruCache<u32, Arc<DecodedBlockU64>>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.