pub struct Key<K> { /* private fields */ }
Expand description
Key is a versioned key
Implementations§
source§impl<K> Key<K>
impl<K> Key<K>
sourcepub fn set_version(&mut self, version: u64)
pub fn set_version(&mut self, version: u64)
Set the version of the key.
sourcepub const fn with_version(self, version: u64) -> Key<K>
pub const fn with_version(self, version: u64) -> Key<K>
Set the version of the key.
sourcepub fn into_components(self) -> (K, u64)
pub fn into_components(self) -> (K, u64)
Consumes the key and returns the key and the version.
Trait Implementations§
source§impl<K> Ord for Key<K>where
K: Ord,
impl<K> Ord for Key<K>where
K: Ord,
source§impl<K> PartialEq for Key<K>where
K: PartialEq,
impl<K> PartialEq for Key<K>where
K: PartialEq,
source§impl<K> PartialOrd for Key<K>where
K: Ord,
impl<K> PartialOrd for Key<K>where
K: Ord,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<K> Eq for Key<K>where
K: Eq,
impl<K> StructuralPartialEq for Key<K>
Auto Trait Implementations§
impl<K> Freeze for Key<K>where
K: Freeze,
impl<K> RefUnwindSafe for Key<K>where
K: RefUnwindSafe,
impl<K> Send for Key<K>where
K: Send,
impl<K> Sync for Key<K>where
K: Sync,
impl<K> Unpin for Key<K>where
K: Unpin,
impl<K> UnwindSafe for Key<K>where
K: UnwindSafe,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.