Skip to main content

ZoneMapIndex

Struct ZoneMapIndex 

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

Collection of zone maps for all chunks of a property column.

Use filter_equal or filter_range to get chunk IDs that might contain matching values.

Implementations§

Source§

impl ZoneMapIndex

Source

pub fn new(property: impl Into<String>) -> Self

Creates a new zone map index for a property.

Source

pub fn property(&self) -> &str

Returns the property name.

Source

pub fn insert(&mut self, chunk_id: u64, entry: ZoneMapEntry)

Adds or updates a zone map entry for a chunk.

Source

pub fn get(&self, chunk_id: u64) -> Option<&ZoneMapEntry>

Gets the zone map entry for a chunk.

Source

pub fn remove(&mut self, chunk_id: u64) -> Option<ZoneMapEntry>

Removes the zone map entry for a chunk.

Source

pub fn len(&self) -> usize

Returns the number of chunks with zone maps.

Source

pub fn is_empty(&self) -> bool

Returns true if there are no zone maps.

Source

pub fn filter_equal<'a>( &'a self, value: &'a Value, chunk_ids: impl Iterator<Item = u64> + 'a, ) -> impl Iterator<Item = u64> + 'a

Filters chunk IDs that might match an equality predicate.

Source

pub fn filter_range<'a>( &'a self, lower: Option<&'a Value>, upper: Option<&'a Value>, lower_inclusive: bool, upper_inclusive: bool, chunk_ids: impl Iterator<Item = u64> + 'a, ) -> impl Iterator<Item = u64> + 'a

Filters chunk IDs that might match a range predicate.

Source

pub fn chunks_ordered_by_min(&self) -> Vec<u64>

Returns chunk IDs sorted by their minimum value.

Source

pub fn overall_stats(&self) -> (Option<Value>, Option<Value>, u64, u64)

Returns overall statistics across all chunks.

Auto Trait Implementations§

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.