Skip to main content

LookupView

Struct LookupView 

Source
pub struct LookupView<'a> { /* private fields */ }
Expand description

Read-only view of the sorted lookup exactly as the sink is about to seal it: row r of the lookup sub-index is (path(r), loc(r)), ordered by (relative_path, chunk_seq).

Handed to a ReservedSectionBuilder so an extra index can point at real lookup row numbers instead of re-deriving the sort and hoping the two agree (LAW 5 — fix by construction, do not add a guard watching two copies).

Implementations§

Source§

impl<'a> LookupView<'a>

Source

pub fn len(&self) -> usize

Number of lookup rows.

Source

pub fn is_empty(&self) -> bool

Source

pub fn path(&self, row: usize) -> &'a str

relative_path of lookup row row.

Source

pub fn loc(&self, row: usize) -> &'a ChunkLoc

Chunk location of lookup row row.

Source

pub fn first_rows(&self) -> Vec<(&'a str, u64)>

Every distinct relative_path, in sorted order, with the lookup row its contiguous chunk run starts at.

Auto Trait Implementations§

§

impl<'a> Freeze for LookupView<'a>

§

impl<'a> RefUnwindSafe for LookupView<'a>

§

impl<'a> Send for LookupView<'a>

§

impl<'a> Sync for LookupView<'a>

§

impl<'a> Unpin for LookupView<'a>

§

impl<'a> UnsafeUnpin for LookupView<'a>

§

impl<'a> UnwindSafe for LookupView<'a>

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.