pub struct KeySize(/* private fields */);
Expand description
KeySize which is used to represent a length of a key stored in the skiplist, it is a 27-bit unsigned integer.
Implementations§
Source§impl KeySize
impl KeySize
Sourcepub fn checked_add(self, rhs: Self) -> Option<Self>
pub fn checked_add(self, rhs: Self) -> Option<Self>
Checked integer addition. Computes self + rhs
, returning None
if overflow occurred.
Sourcepub fn checked_sub(self, rhs: Self) -> Option<Self>
pub fn checked_sub(self, rhs: Self) -> Option<Self>
Checked integer subtraction. Computes self - rhs
, returning None
if overflow occurred.
Sourcepub fn wrapping_add(self, rhs: Self) -> Self
pub fn wrapping_add(self, rhs: Self) -> Self
Wrapping (modular) addition. Computes self + rhs
, wrapping around at the boundary of the type.
Sourcepub fn wrapping_sub(self, rhs: Self) -> Self
pub fn wrapping_sub(self, rhs: Self) -> Self
Wrapping (modular) subtraction. Computes self - rhs
, wrapping around at the boundary of the type.
Source§impl KeySize
impl KeySize
Sourcepub fn try_from_u32(val: u32) -> Result<Self, TryNewError>
pub fn try_from_u32(val: u32) -> Result<Self, TryNewError>
Try to create aKeySize from the given u32
Sourcepub const fn from_u32_unchecked(val: u32) -> Self
pub const fn from_u32_unchecked(val: u32) -> Self
Source§impl KeySize
impl KeySize
Sourcepub fn try_from_usize(val: usize) -> Result<Self, TryNewError>
pub fn try_from_usize(val: usize) -> Result<Self, TryNewError>
Try to create aKeySize from the given usize
Sourcepub const fn from_usize_unchecked(val: usize) -> Self
pub const fn from_usize_unchecked(val: usize) -> Self
Trait Implementations§
Source§impl AddAssign<u16> for KeySize
impl AddAssign<u16> for KeySize
Source§fn add_assign(&mut self, rhs: u16)
fn add_assign(&mut self, rhs: u16)
Performs the
+=
operation. Read moreSource§impl AddAssign<u32> for KeySize
impl AddAssign<u32> for KeySize
Source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+=
operation. Read moreSource§impl AddAssign<u64> for KeySize
impl AddAssign<u64> for KeySize
Source§fn add_assign(&mut self, rhs: u64)
fn add_assign(&mut self, rhs: u64)
Performs the
+=
operation. Read moreSource§impl AddAssign<u8> for KeySize
impl AddAssign<u8> for KeySize
Source§fn add_assign(&mut self, rhs: u8)
fn add_assign(&mut self, rhs: u8)
Performs the
+=
operation. Read moreSource§impl AddAssign<usize> for KeySize
impl AddAssign<usize> for KeySize
Source§fn add_assign(&mut self, rhs: usize)
fn add_assign(&mut self, rhs: usize)
Performs the
+=
operation. Read moreSource§impl AddAssign for KeySize
impl AddAssign for KeySize
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl Ord for KeySize
impl Ord for KeySize
Source§impl PartialOrd<KeySize> for i16
impl PartialOrd<KeySize> for i16
Source§impl PartialOrd<KeySize> for i32
impl PartialOrd<KeySize> for i32
Source§impl PartialOrd<KeySize> for i64
impl PartialOrd<KeySize> for i64
Source§impl PartialOrd<KeySize> for i8
impl PartialOrd<KeySize> for i8
Source§impl PartialOrd<KeySize> for isize
impl PartialOrd<KeySize> for isize
Source§impl PartialOrd<i16> for KeySize
impl PartialOrd<i16> for KeySize
Source§impl PartialOrd<i32> for KeySize
impl PartialOrd<i32> for KeySize
Source§impl PartialOrd<i64> for KeySize
impl PartialOrd<i64> for KeySize
Source§impl PartialOrd<i8> for KeySize
impl PartialOrd<i8> for KeySize
Source§impl PartialOrd<isize> for KeySize
impl PartialOrd<isize> for KeySize
Source§impl PartialOrd<u16> for KeySize
impl PartialOrd<u16> for KeySize
Source§impl PartialOrd<u32> for KeySize
impl PartialOrd<u32> for KeySize
Source§impl PartialOrd<u64> for KeySize
impl PartialOrd<u64> for KeySize
Source§impl PartialOrd<u8> for KeySize
impl PartialOrd<u8> for KeySize
Source§impl PartialOrd<usize> for KeySize
impl PartialOrd<usize> for KeySize
Source§impl PartialOrd for KeySize
impl PartialOrd for KeySize
Source§impl SubAssign<u16> for KeySize
impl SubAssign<u16> for KeySize
Source§fn sub_assign(&mut self, rhs: u16)
fn sub_assign(&mut self, rhs: u16)
Performs the
-=
operation. Read moreSource§impl SubAssign<u32> for KeySize
impl SubAssign<u32> for KeySize
Source§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
Performs the
-=
operation. Read moreSource§impl SubAssign<u64> for KeySize
impl SubAssign<u64> for KeySize
Source§fn sub_assign(&mut self, rhs: u64)
fn sub_assign(&mut self, rhs: u64)
Performs the
-=
operation. Read moreSource§impl SubAssign<u8> for KeySize
impl SubAssign<u8> for KeySize
Source§fn sub_assign(&mut self, rhs: u8)
fn sub_assign(&mut self, rhs: u8)
Performs the
-=
operation. Read moreSource§impl SubAssign<usize> for KeySize
impl SubAssign<usize> for KeySize
Source§fn sub_assign(&mut self, rhs: usize)
fn sub_assign(&mut self, rhs: usize)
Performs the
-=
operation. Read moreSource§impl SubAssign for KeySize
impl SubAssign for KeySize
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for KeySize
impl Eq for KeySize
impl StructuralPartialEq for KeySize
Auto Trait Implementations§
impl Freeze for KeySize
impl RefUnwindSafe for KeySize
impl Send for KeySize
impl Sync for KeySize
impl Unpin for KeySize
impl UnwindSafe for KeySize
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> 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