Struct async_mwmr::Entry
source · pub struct Entry<K, V> {
pub version: u64,
pub data: EntryData<K, V>,
}
Expand description
An entry can be persisted to the database.
Fields§
§version: u64
§data: EntryData<K, V>
Implementations§
source§impl<K, V> Entry<K, V>
impl<K, V> Entry<K, V>
sourcepub const fn version(&self) -> u64
pub const fn version(&self) -> u64
Returns the version (can also be tought as transaction timestamp) of the entry.
sourcepub fn into_components(self) -> (u64, EntryData<K, V>)
pub fn into_components(self) -> (u64, EntryData<K, V>)
Consumes the entry and returns the version and the entry data.
sourcepub fn split(self) -> (K, EntryValue<V>)
pub fn split(self) -> (K, EntryValue<V>)
Split the entry into its key and EntryValue
.
sourcepub fn unsplit(key: K, value: EntryValue<V>) -> Entry<K, V>
pub fn unsplit(key: K, value: EntryValue<V>) -> Entry<K, V>
Unsplit the key and EntryValue
into an entry.
Trait Implementations§
source§impl<K, V> CheapClone for Entry<K, V>where
K: CheapClone,
V: CheapClone,
impl<K, V> CheapClone for Entry<K, V>where
K: CheapClone,
V: CheapClone,
source§fn cheap_clone(&self) -> Entry<K, V>
fn cheap_clone(&self) -> Entry<K, V>
Returns a copy of the value.
Auto Trait Implementations§
impl<K, V> Freeze for Entry<K, V>
impl<K, V> RefUnwindSafe for Entry<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Entry<K, V>
impl<K, V> Sync for Entry<K, V>
impl<K, V> Unpin for Entry<K, V>
impl<K, V> UnwindSafe for Entry<K, V>where
K: UnwindSafe,
V: 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