pub struct SkipMap<K: ?Sized, V: ?Sized, C = Ascend>(/* private fields */);Expand description
A fast, ARENA based SkipMap that supports multiple versions, forward and backward iteration.
If you want to use in concurrent environment, you can use multiple_version::sync::SkipMap.
Trait Implementations§
Source§impl<K, V, C> Map<K, V, C> for SkipMap<K, V, C>
impl<K, V, C> Map<K, V, C> for SkipMap<K, V, C>
Source§type Allocator = GenericAllocator<VersionedMeta, VersionedNode, Arena>
type Allocator = GenericAllocator<VersionedMeta, VersionedNode, Arena>
The allocator type used to allocate nodes in the map.
Source§fn create_from_allocator(arena: Self::Allocator, cmp: C) -> Result<Self, Error>
fn create_from_allocator(arena: Self::Allocator, cmp: C) -> Result<Self, Error>
Try creates from a
SkipMap from an allocator directly. Read moreSource§unsafe fn open_from_allocator(
header: Header,
arena: Self::Allocator,
cmp: C,
) -> Result<Self, Error>
unsafe fn open_from_allocator( header: Header, arena: Self::Allocator, cmp: C, ) -> Result<Self, Error>
Try open a
SkipMap from an allocator directly. Read moreSource§fn height(&self) -> u8
fn height(&self) -> u8
Returns the height of the highest tower within any of the nodes that
have ever been allocated as part of this skiplist.
Source§fn len(&self) -> usize
fn len(&self) -> usize
Returns the number of entries in the map, this
len includes all entry versions. Read moreSource§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Returns
true if the map is empty, if the map only contains tombstones, this method will also return false.Source§fn maximum_version(&self) -> Version
fn maximum_version(&self) -> Version
Returns the maximum version of all entries in the map.
Source§fn minimum_version(&self) -> Version
fn minimum_version(&self) -> Version
Returns the minimum version of all entries in the map.
Source§fn random_height(&self) -> Height
fn random_height(&self) -> Height
Returns a random generated height. Read more
Source§fn may_contain_version(&self, v: Version) -> bool
fn may_contain_version(&self, v: Version) -> bool
Returns
true if the map may contains an entry whose version is less than or equal to the given version.Source§fn contains_key<'a, Q>(&'a self, version: Version, key: &Q) -> bool
fn contains_key<'a, Q>(&'a self, version: Version, key: &Q) -> bool
Returns
true if the key exists in the map. Read moreSource§fn contains_key_with_tombstone<'a, Q>(
&'a self,
version: Version,
key: &Q,
) -> bool
fn contains_key_with_tombstone<'a, Q>( &'a self, version: Version, key: &Q, ) -> bool
Returns
true if the key exists in the map, even if it is marked as removed. Read moreSource§fn first<'a>(
&'a self,
version: Version,
) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
fn first<'a>( &'a self, version: Version, ) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
Returns the first entry in the map.
Source§fn last<'a>(
&'a self,
version: Version,
) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
fn last<'a>( &'a self, version: Version, ) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
Returns the last entry in the map.
Source§fn first_with_tombstone<'a>(
&'a self,
version: Version,
) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
fn first_with_tombstone<'a>( &'a self, version: Version, ) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
Returns the first entry in the map. The returned entry may not be in valid state. (i.e. the entry is removed) Read more
Source§fn last_with_tombstone<'a>(
&'a self,
version: Version,
) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
fn last_with_tombstone<'a>( &'a self, version: Version, ) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
Returns the last entry in the map. The returned entry may not be in valid state. (i.e. the entry is removed) Read more
Source§fn get<'a, Q>(
&'a self,
version: Version,
key: &Q,
) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
fn get<'a, Q>( &'a self, version: Version, key: &Q, ) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
Returns the value associated with the given key, if it exists. Read more
Source§fn get_with_tombstone<'a, Q>(
&'a self,
version: Version,
key: &Q,
) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
fn get_with_tombstone<'a, Q>( &'a self, version: Version, key: &Q, ) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
Returns the value associated with the given key, if it exists. Read more
Source§fn upper_bound<'a, Q>(
&'a self,
version: Version,
upper: Bound<&Q>,
) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
fn upper_bound<'a, Q>( &'a self, version: Version, upper: Bound<&Q>, ) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
Returns an
EntryRef pointing to the highest element whose key is below the given bound.
If no such element is found then None is returned.Source§fn lower_bound<'a, Q>(
&'a self,
version: Version,
lower: Bound<&Q>,
) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
fn lower_bound<'a, Q>( &'a self, version: Version, lower: Bound<&Q>, ) -> Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>
Returns an
EntryRef pointing to the lowest element whose key is above the given bound.
If no such element is found then None is returned.Source§fn upper_bound_with_tombstone<'a, Q>(
&'a self,
version: Version,
upper: Bound<&Q>,
) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
fn upper_bound_with_tombstone<'a, Q>( &'a self, version: Version, upper: Bound<&Q>, ) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
Returns an
EntryRef pointing to the highest element whose key is below the given bound.
If no such element is found then None is returned. Read moreSource§fn lower_bound_with_tombstone<'a, Q>(
&'a self,
version: Version,
lower: Bound<&Q>,
) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
fn lower_bound_with_tombstone<'a, Q>( &'a self, version: Version, lower: Bound<&Q>, ) -> Option<EntryRef<'a, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter>>
Returns an
EntryRef pointing to the lowest element whose key is above the given bound.
If no such element is found then None is returned. Read moreSource§fn iter(
&self,
version: Version,
) -> Iter<'_, K, V, Active, C, Self::Allocator, Self::RefCounter> ⓘ
fn iter( &self, version: Version, ) -> Iter<'_, K, V, Active, C, Self::Allocator, Self::RefCounter> ⓘ
Returns a new iterator, this iterator will yield the latest version of all entries in the map less or equal to the given version.
Source§fn iter_all(
&self,
version: Version,
) -> Iter<'_, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter> ⓘ
fn iter_all( &self, version: Version, ) -> Iter<'_, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter> ⓘ
Returns a new iterator, this iterator will yield all versions for all entries in the map less or equal to the given version.
Source§fn range<Q, R>(
&self,
version: Version,
range: R,
) -> Range<'_, K, V, Active, C, Self::Allocator, Self::RefCounter, Q, R> ⓘ
fn range<Q, R>( &self, version: Version, range: R, ) -> Range<'_, K, V, Active, C, Self::Allocator, Self::RefCounter, Q, R> ⓘ
Returns a iterator that within the range, this iterator will yield the latest version of all entries in the range less or equal to the given version.
Source§fn range_all<Q, R>(
&self,
version: Version,
range: R,
) -> Range<'_, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter, Q, R> ⓘ
fn range_all<Q, R>( &self, version: Version, range: R, ) -> Range<'_, K, V, MaybeTombstone, C, Self::Allocator, Self::RefCounter, Q, R> ⓘ
Returns a iterator that within the range, this iterator will yield all versions for all entries in the range less or equal to the given version.
Source§fn insert<'a, 'b: 'a>(
&'a self,
version: Version,
key: impl Into<MaybeStructured<'b, K>>,
value: impl Into<MaybeStructured<'b, V>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, V::Error, Error>>
fn insert<'a, 'b: 'a>( &'a self, version: Version, key: impl Into<MaybeStructured<'b, K>>, value: impl Into<MaybeStructured<'b, V>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, V::Error, Error>>
Upserts a new key-value pair if it does not yet exist, if the key with the given version already exists, it will update the value.
Unlike
get_or_insert, this method will update the value if the key with the given version already exists. Read moreSource§fn insert_at_height<'a, 'b: 'a>(
&'a self,
version: Version,
height: Height,
key: impl Into<MaybeStructured<'b, K>>,
value: impl Into<MaybeStructured<'b, V>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, V::Error, Error>>
fn insert_at_height<'a, 'b: 'a>( &'a self, version: Version, height: Height, key: impl Into<MaybeStructured<'b, K>>, value: impl Into<MaybeStructured<'b, V>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, V::Error, Error>>
Upserts a new key-value pair at the given height if it does not yet exist, if the key with the given version already exists, it will update the value.
Unlike
get_or_insert_at_height, this method will update the value if the key with the given version already exists. Read moreSource§fn insert_with_value_builder<'a, 'b: 'a, E>(
&'a self,
version: Version,
key: impl Into<MaybeStructured<'b, K>>,
value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, E, Error>>
fn insert_with_value_builder<'a, 'b: 'a, E>( &'a self, version: Version, key: impl Into<MaybeStructured<'b, K>>, value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, E, Error>>
Upserts a new key if it does not yet exist, if the key with the given version already exists, it will update the value.
Unlike
get_or_insert_with_value_builder, this method will update the value if the key with the given version already exists. Read moreSource§fn insert_at_height_with_value_builder<'a, 'b: 'a, E>(
&'a self,
version: Version,
height: Height,
key: impl Into<MaybeStructured<'b, K>>,
value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, E, Error>>
fn insert_at_height_with_value_builder<'a, 'b: 'a, E>( &'a self, version: Version, height: Height, key: impl Into<MaybeStructured<'b, K>>, value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, E, Error>>
Upserts a new key if it does not yet exist, if the key with the given version already exists, it will update the value.
Unlike
get_or_insert_with_value_builder, this method will update the value if the key with the given version already exists. Read moreSource§fn get_or_insert<'a, 'b: 'a>(
&'a self,
version: Version,
key: impl Into<MaybeStructured<'b, K>>,
value: impl Into<MaybeStructured<'b, V>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, V::Error, Error>>
fn get_or_insert<'a, 'b: 'a>( &'a self, version: Version, key: impl Into<MaybeStructured<'b, K>>, value: impl Into<MaybeStructured<'b, V>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, V::Error, Error>>
Inserts a new key-value pair if it does not yet exist. Read more
Source§fn get_or_insert_at_height<'a, 'b: 'a>(
&'a self,
version: Version,
height: Height,
key: impl Into<MaybeStructured<'b, K>>,
value: impl Into<MaybeStructured<'b, V>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, V::Error, Error>>
fn get_or_insert_at_height<'a, 'b: 'a>( &'a self, version: Version, height: Height, key: impl Into<MaybeStructured<'b, K>>, value: impl Into<MaybeStructured<'b, V>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, V::Error, Error>>
Inserts a new key-value pair at height if it does not yet exist. Read more
Source§fn get_or_insert_with_value_builder<'a, 'b: 'a, E>(
&'a self,
version: Version,
key: impl Into<MaybeStructured<'b, K>>,
value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, E, Error>>
fn get_or_insert_with_value_builder<'a, 'b: 'a, E>( &'a self, version: Version, key: impl Into<MaybeStructured<'b, K>>, value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, E, Error>>
Inserts a new key if it does not yet exist. Read more
Source§fn get_or_insert_at_height_with_value_builder<'a, 'b: 'a, E>(
&'a self,
version: Version,
height: Height,
key: impl Into<MaybeStructured<'b, K>>,
value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, E, Error>>
fn get_or_insert_at_height_with_value_builder<'a, 'b: 'a, E>( &'a self, version: Version, height: Height, key: impl Into<MaybeStructured<'b, K>>, value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<K::Error, E, Error>>
Inserts a new key if it does not yet exist. Read more
Source§fn insert_with_builders<'a, KE, VE>(
&'a self,
version: Version,
key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, KE>>,
value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, VE>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<KE, VE, Error>>
fn insert_with_builders<'a, KE, VE>( &'a self, version: Version, key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, KE>>, value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, VE>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<KE, VE, Error>>
Upserts a new key if it does not yet exist, if the key with the given version already exists, it will update the value.
Unlike
get_or_insert_with_builders, this method will update the value if the key with the given version already exists. Read moreSource§fn insert_at_height_with_builders<'a, KE, VE>(
&'a self,
version: Version,
height: Height,
key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, KE>>,
value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, VE>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<KE, VE, Error>>
fn insert_at_height_with_builders<'a, KE, VE>( &'a self, version: Version, height: Height, key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, KE>>, value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, VE>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<KE, VE, Error>>
Upserts a new key if it does not yet exist, if the key with the given version already exists, it will update the value. Read more
Source§fn get_or_insert_with_builders<'a, KE, VE>(
&'a self,
version: Version,
key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, KE>>,
value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, VE>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<KE, VE, Error>>
fn get_or_insert_with_builders<'a, KE, VE>( &'a self, version: Version, key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, KE>>, value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, VE>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<KE, VE, Error>>
Inserts a new key if it does not yet exist. Read more
Source§fn get_or_insert_at_height_with_builders<'a, KE, VE>(
&'a self,
version: Version,
height: Height,
key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, KE>>,
value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, VE>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<KE, VE, Error>>
fn get_or_insert_at_height_with_builders<'a, KE, VE>( &'a self, version: Version, height: Height, key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, KE>>, value_builder: ValueBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, VE>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Among<KE, VE, Error>>
Inserts a new key if it does not yet exist. Read more
Source§fn compare_remove<'a, 'b: 'a>(
&'a self,
version: Version,
key: impl Into<MaybeStructured<'b, K>>,
success: Ordering,
failure: Ordering,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<K::Error, Error>>
fn compare_remove<'a, 'b: 'a>( &'a self, version: Version, key: impl Into<MaybeStructured<'b, K>>, success: Ordering, failure: Ordering, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<K::Error, Error>>
Removes the key-value pair if it exists. A CAS operation will be used to ensure the operation is atomic. Read more
Source§fn compare_remove_at_height<'a, 'b: 'a>(
&'a self,
version: Version,
height: Height,
key: impl Into<MaybeStructured<'b, K>>,
success: Ordering,
failure: Ordering,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<K::Error, Error>>
fn compare_remove_at_height<'a, 'b: 'a>( &'a self, version: Version, height: Height, key: impl Into<MaybeStructured<'b, K>>, success: Ordering, failure: Ordering, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<K::Error, Error>>
Removes the key-value pair if it exists. A CAS operation will be used to ensure the operation is atomic. Read more
Source§fn get_or_remove<'a, 'b: 'a>(
&'a self,
version: Version,
key: impl Into<MaybeStructured<'b, K>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<K::Error, Error>>
fn get_or_remove<'a, 'b: 'a>( &'a self, version: Version, key: impl Into<MaybeStructured<'b, K>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<K::Error, Error>>
Gets or removes the key-value pair if it exists. Read more
Source§fn get_or_remove_at_height<'a, 'b: 'a>(
&'a self,
version: Version,
height: Height,
key: impl Into<MaybeStructured<'b, K>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<K::Error, Error>>
fn get_or_remove_at_height<'a, 'b: 'a>( &'a self, version: Version, height: Height, key: impl Into<MaybeStructured<'b, K>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<K::Error, Error>>
Gets or removes the key-value pair if it exists. Read more
Source§fn get_or_remove_with_builder<'a, 'b: 'a, E>(
&'a self,
version: Version,
key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<E, Error>>
fn get_or_remove_with_builder<'a, 'b: 'a, E>( &'a self, version: Version, key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<E, Error>>
Gets or removes the key-value pair if it exists. Read more
Source§fn get_or_remove_at_height_with_builder<'a, 'b: 'a, E>(
&'a self,
version: Version,
height: Height,
key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>,
) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<E, Error>>
fn get_or_remove_at_height_with_builder<'a, 'b: 'a, E>( &'a self, version: Version, height: Height, key_builder: KeyBuilder<impl FnOnce(&mut VacantBuffer<'a>) -> Result<usize, E>>, ) -> Result<Option<EntryRef<'a, K, V, Active, C, Self::Allocator, Self::RefCounter>>, Either<E, Error>>
Gets or removes the key-value pair if it exists. Read more
Auto Trait Implementations§
impl<K, V, C> Freeze for SkipMap<K, V, C>
impl<K, V, C = Ascend> !RefUnwindSafe for SkipMap<K, V, C>
impl<K, V, C = Ascend> !Send for SkipMap<K, V, C>
impl<K, V, C = Ascend> !Sync for SkipMap<K, V, C>
impl<K, V, C> Unpin for SkipMap<K, V, C>
impl<K, V, C> UnsafeUnpin for SkipMap<K, V, C>
impl<K, V, C = Ascend> !UnwindSafe for SkipMap<K, V, C>
Blanket Implementations§
Source§impl<T> Arena for Twhere
T: List,
impl<T> Arena for Twhere
T: List,
Source§fn reserved_bytes(&self) -> usize
fn reserved_bytes(&self) -> usize
Returns how many bytes are reserved by the ARENA.
Source§fn reserved_slice(&self) -> &[u8] ⓘ
fn reserved_slice(&self) -> &[u8] ⓘ
Returns the reserved bytes of the allocator specified in the
Options::with_reserved.Source§unsafe fn clear(&mut self) -> Result<(), Error>
unsafe fn clear(&mut self) -> Result<(), Error>
Clear the allocator to empty and re-initialize. Read more
Source§unsafe fn reserved_slice_mut(&self) -> &mut [u8] ⓘ
unsafe fn reserved_slice_mut(&self) -> &mut [u8] ⓘ
Returns the mutable reserved bytes of the allocator specified in the
Options::with_reserved. Read moreSource§fn path(
&self,
) -> Option<&<<<Self::Constructable as Constructable>::Allocator as AllocatorSealed>::Allocator as ArenaAllocator>::Path>
fn path( &self, ) -> Option<&<<<Self::Constructable as Constructable>::Allocator as AllocatorSealed>::Allocator as ArenaAllocator>::Path>
Available on crate feature
memmap and non-target_family=wasm only.Returns the path of the mmap file, only returns
Some when the ARENA is backed by a mmap file.Source§fn remove_on_drop(&self, val: bool)
fn remove_on_drop(&self, val: bool)
Available on crate feature
memmap and non-target_family=wasm only.Sets remove on drop, only works on mmap with a file backend. Read more
Source§fn remaining(&self) -> usize
fn remaining(&self) -> usize
Returns the number of remaining bytes can be allocated by the arena.
Source§fn refs(&self) -> usize
fn refs(&self) -> usize
Gets the number of pointers to this
SkipMap similar to Arc::strong_count.Source§fn allocator(&self) -> &<Self::Constructable as Constructable>::Allocator
fn allocator(&self) -> &<Self::Constructable as Constructable>::Allocator
Returns the allocator used to allocate nodes.
Source§fn allocator_mut(
&mut self,
) -> &mut <Self::Constructable as Constructable>::Allocator
fn allocator_mut( &mut self, ) -> &mut <Self::Constructable as Constructable>::Allocator
Returns the mutable reference to the allocator used to allocate nodes.
Source§fn estimated_node_size(
height: Height,
key_size: usize,
value_size: usize,
) -> usize
fn estimated_node_size( height: Height, key_size: usize, value_size: usize, ) -> usize
Returns the estimated size of a node with the given height and key/value sizes. Read more
Source§fn full_node_size(max_height: Height) -> usize
fn full_node_size(max_height: Height) -> usize
Returns the full node size of the allocator.
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
Source§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
Compare self to
key and return true if they are equal.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