pub struct MultipleVersionTable<K: ?Sized, V: ?Sized>(/* private fields */);Available on crate feature
std only.Expand description
An memory table implementation based on crossbeam_skiplist::SkipSet.
Trait Implementations§
Source§impl<K, V> BaseTable for MultipleVersionTable<K, V>
impl<K, V> BaseTable for MultipleVersionTable<K, V>
Source§type Item<'a> = Entry<'a, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>>
where
Self: 'a
type Item<'a> = Entry<'a, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>> where Self: 'a
The item returned by the iterator or query methods.
Source§type Iterator<'a> = Iter<'a, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>>
where
Self: 'a
type Iterator<'a> = Iter<'a, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>> where Self: 'a
The iterator type.
Source§type Range<'a, Q, R> = Range<'a, Q, R, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>>
where
Self: 'a,
R: RangeBounds<Q> + 'a,
Q: ?Sized + Comparable<KeyPointer<Self::Key>>
type Range<'a, Q, R> = Range<'a, Q, R, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>> where Self: 'a, R: RangeBounds<Q> + 'a, Q: ?Sized + Comparable<KeyPointer<Self::Key>>
The range iterator type.
Source§type Error = Infallible
type Error = Infallible
The error type may be returned when constructing the memtable.
Source§fn new(_: Self::Options) -> Result<Self, Self::Error>where
Self: Sized,
fn new(_: Self::Options) -> Result<Self, Self::Error>where
Self: Sized,
Creates a new memtable with the specified options.
Source§fn insert(
&self,
version: Option<u64>,
kp: KeyPointer<Self::Key>,
vp: ValuePointer<Self::Value>,
) -> Result<(), Self::Error>
fn insert( &self, version: Option<u64>, kp: KeyPointer<Self::Key>, vp: ValuePointer<Self::Value>, ) -> Result<(), Self::Error>
Inserts a pointer into the memtable.
Source§impl<K, V> Default for MultipleVersionTable<K, V>
impl<K, V> Default for MultipleVersionTable<K, V>
Source§impl<K, V> MultipleVersionMemtable for MultipleVersionTable<K, V>
impl<K, V> MultipleVersionMemtable for MultipleVersionTable<K, V>
Source§type VersionedItem<'a> = VersionedEntry<'a, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>>
where
Self: 'a
type VersionedItem<'a> = VersionedEntry<'a, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>> where Self: 'a
The item returned by the iterator or query methods.
Source§type IterAll<'a> = IterAll<'a, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>>
where
Self: 'a
type IterAll<'a> = IterAll<'a, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>> where Self: 'a
The iterator type which can yields all the entries in the memtable.
Source§type RangeAll<'a, Q, R> = RangeAll<'a, Q, R, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>>
where
Self: 'a,
R: RangeBounds<Q> + 'a,
Q: ?Sized + Comparable<KeyPointer<Self::Key>>
type RangeAll<'a, Q, R> = RangeAll<'a, Q, R, KeyPointer<<MultipleVersionTable<K, V> as BaseTable>::Key>, ValuePointer<<MultipleVersionTable<K, V> as BaseTable>::Value>> where Self: 'a, R: RangeBounds<Q> + 'a, Q: ?Sized + Comparable<KeyPointer<Self::Key>>
The range iterator type which can yields all the entries in the memtable.
Source§fn maximum_version(&self) -> u64
fn maximum_version(&self) -> u64
Returns the maximum version of the memtable.
Source§fn minimum_version(&self) -> u64
fn minimum_version(&self) -> u64
Returns the minimum version of the memtable.
Source§fn may_contain_version(&self, version: u64) -> bool
fn may_contain_version(&self, version: u64) -> bool
Returns
true if the memtable may contain an entry whose version is less than or equal to the specified version.Source§fn upper_bound<Q>(
&self,
version: u64,
bound: Bound<&Q>,
) -> Option<Self::Item<'_>>
fn upper_bound<Q>( &self, version: u64, bound: Bound<&Q>, ) -> Option<Self::Item<'_>>
Returns the upper bound of the memtable.
Source§fn upper_bound_versioned<Q>(
&self,
version: u64,
bound: Bound<&Q>,
) -> Option<Self::VersionedItem<'_>>
fn upper_bound_versioned<Q>( &self, version: u64, bound: Bound<&Q>, ) -> Option<Self::VersionedItem<'_>>
Returns the upper bound of the memtable.
Source§fn lower_bound<Q>(
&self,
version: u64,
bound: Bound<&Q>,
) -> Option<Self::Item<'_>>
fn lower_bound<Q>( &self, version: u64, bound: Bound<&Q>, ) -> Option<Self::Item<'_>>
Returns the lower bound of the memtable.
Source§fn lower_bound_versioned<Q>(
&self,
version: u64,
bound: Bound<&Q>,
) -> Option<Self::VersionedItem<'_>>
fn lower_bound_versioned<Q>( &self, version: u64, bound: Bound<&Q>, ) -> Option<Self::VersionedItem<'_>>
Returns the lower bound of the memtable.
Source§fn first(&self, version: u64) -> Option<Self::Item<'_>>
fn first(&self, version: u64) -> Option<Self::Item<'_>>
Returns the first pointer in the memtable.
Source§fn first_versioned(&self, version: u64) -> Option<Self::VersionedItem<'_>>
fn first_versioned(&self, version: u64) -> Option<Self::VersionedItem<'_>>
Returns the first pointer in the memtable.
Source§fn last(&self, version: u64) -> Option<Self::Item<'_>>
fn last(&self, version: u64) -> Option<Self::Item<'_>>
Returns the last pointer in the memtable.
Source§fn last_versioned(&self, version: u64) -> Option<Self::VersionedItem<'_>>
fn last_versioned(&self, version: u64) -> Option<Self::VersionedItem<'_>>
Returns the last pointer in the memtable.
Source§fn get<Q>(&self, version: u64, key: &Q) -> Option<Self::Item<'_>>
fn get<Q>(&self, version: u64, key: &Q) -> Option<Self::Item<'_>>
Returns the pointer associated with the key.
Source§fn get_versioned<Q>(
&self,
version: u64,
key: &Q,
) -> Option<Self::VersionedItem<'_>>
fn get_versioned<Q>( &self, version: u64, key: &Q, ) -> Option<Self::VersionedItem<'_>>
Returns the pointer associated with the key.
Source§fn contains<Q>(&self, version: u64, key: &Q) -> bool
fn contains<Q>(&self, version: u64, key: &Q) -> bool
Returns
true if the memtable contains the specified pointer.Source§fn contains_versioned<Q>(&self, version: u64, key: &Q) -> bool
fn contains_versioned<Q>(&self, version: u64, key: &Q) -> bool
Returns
true if the memtable contains the specified pointer.Source§fn iter_all_versions(&self, version: u64) -> Self::IterAll<'_>
fn iter_all_versions(&self, version: u64) -> Self::IterAll<'_>
Returns an iterator over all the entries in the memtable.
Source§fn range<'a, Q, R>(&'a self, version: u64, range: R) -> Self::Range<'a, Q, R>
fn range<'a, Q, R>(&'a self, version: u64, range: R) -> Self::Range<'a, Q, R>
Returns an iterator over a subset of the memtable.
Source§fn range_all_versions<'a, Q, R>(
&'a self,
version: u64,
range: R,
) -> Self::RangeAll<'a, Q, R>
fn range_all_versions<'a, Q, R>( &'a self, version: u64, range: R, ) -> Self::RangeAll<'a, Q, R>
Returns an iterator over all the entries in a subset of the memtable.
Auto Trait Implementations§
impl<K, V> !Freeze for MultipleVersionTable<K, V>
impl<K, V> !RefUnwindSafe for MultipleVersionTable<K, V>
impl<K, V> Send for MultipleVersionTable<K, V>
impl<K, V> Sync for MultipleVersionTable<K, V>
impl<K, V> Unpin for MultipleVersionTable<K, V>
impl<K, V> !UnwindSafe for MultipleVersionTable<K, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoAmong for T
impl<T> IntoAmong for T
Source§fn into_among_with<F>(self, into_left: F) -> Among<Self, Self, Self>
fn into_among_with<F>(self, into_left: F) -> Among<Self, Self, Self>
Converts
self into a Left variant of Among<Self, Self>
if into_left(&self) returns Some(true). Read moreSource§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more