Struct MultipleVersionTable

Source
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>
where K: ?Sized + Type + Ord + 'static, for<'a> K::Ref<'a>: KeyRef<'a, K>, V: ?Sized + 'static,

Source§

type Key = K

The key type.
Source§

type Value = V

The value type.
Source§

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

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>>

The range iterator type.
Source§

type Options = ()

The configuration options for the memtable.
Source§

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,

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>
where KeyPointer<Self::Key>: Ord + 'static,

Inserts a pointer into the memtable.
Source§

fn remove( &self, version: Option<u64>, key: KeyPointer<Self::Key>, ) -> Result<(), Self::Error>
where KeyPointer<Self::Key>: Ord + 'static,

Removes the pointer associated with the key.
Source§

fn kind() -> Kind

Returns the kind of the memtable.
Source§

impl<K, V> Default for MultipleVersionTable<K, V>
where K: ?Sized, V: ?Sized,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<K, V> MultipleVersionMemtable for MultipleVersionTable<K, V>
where K: ?Sized + Type + Ord + 'static, for<'a> K::Ref<'a>: KeyRef<'a, K>, V: ?Sized + 'static,

Source§

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

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>>

The range iterator type which can yields all the entries in the memtable.
Source§

fn maximum_version(&self) -> u64

Returns the maximum version of the memtable.
Source§

fn minimum_version(&self) -> u64

Returns the minimum version of the memtable.
Source§

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<'_>>
where Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

Returns the upper bound of the memtable.
Source§

fn upper_bound_versioned<Q>( &self, version: u64, bound: Bound<&Q>, ) -> Option<Self::VersionedItem<'_>>
where Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

Returns the upper bound of the memtable.
Source§

fn lower_bound<Q>( &self, version: u64, bound: Bound<&Q>, ) -> Option<Self::Item<'_>>
where Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

Returns the lower bound of the memtable.
Source§

fn lower_bound_versioned<Q>( &self, version: u64, bound: Bound<&Q>, ) -> Option<Self::VersionedItem<'_>>
where Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

Returns the lower bound of the memtable.
Source§

fn first(&self, version: u64) -> Option<Self::Item<'_>>
where KeyPointer<Self::Key>: Ord,

Returns the first pointer in the memtable.
Source§

fn first_versioned(&self, version: u64) -> Option<Self::VersionedItem<'_>>
where KeyPointer<Self::Key>: Ord,

Returns the first pointer in the memtable.
Source§

fn last(&self, version: u64) -> Option<Self::Item<'_>>
where KeyPointer<Self::Key>: Ord,

Returns the last pointer in the memtable.
Source§

fn last_versioned(&self, version: u64) -> Option<Self::VersionedItem<'_>>
where KeyPointer<Self::Key>: Ord,

Returns the last pointer in the memtable.
Source§

fn get<Q>(&self, version: u64, key: &Q) -> Option<Self::Item<'_>>
where Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

Returns the pointer associated with the key.
Source§

fn get_versioned<Q>( &self, version: u64, key: &Q, ) -> Option<Self::VersionedItem<'_>>
where Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

Returns the pointer associated with the key.
Source§

fn contains<Q>(&self, version: u64, key: &Q) -> bool
where Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

Returns true if the memtable contains the specified pointer.
Source§

fn contains_versioned<Q>(&self, version: u64, key: &Q) -> bool
where Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

Returns true if the memtable contains the specified pointer.
Source§

fn iter(&self, version: u64) -> Self::Iterator<'_>

Returns an iterator over the memtable.
Source§

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>
where R: RangeBounds<Q> + 'a, Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

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>
where R: RangeBounds<Q> + 'a, Q: ?Sized + Comparable<KeyPointer<Self::Key>>,

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>
where K: ?Sized, V: ?Sized,

§

impl<K, V> Sync for MultipleVersionTable<K, V>
where K: ?Sized, V: ?Sized,

§

impl<K, V> Unpin for MultipleVersionTable<K, V>
where K: ?Sized, V: ?Sized,

§

impl<K, V> !UnwindSafe for MultipleVersionTable<K, V>

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

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoAmong for T

Source§

fn into_among(self, into_left: Option<bool>) -> Among<Self, Self, Self>

Converts self into a Left variant of Among<Self, Self> if into_left is Some(true). Read more
Source§

fn into_among_with<F>(self, into_left: F) -> Among<Self, Self, Self>
where F: FnOnce(&Self) -> Option<bool>,

Converts self into a Left variant of Among<Self, Self> if into_left(&self) returns Some(true). Read more
Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more