pub struct Item<K, V> {
pub key: K,
pub value: V,
pub sequence: u64,
}
Expand description
Item is a struct that combines a key and a value.
Fields§
§key: K
§value: V
§sequence: u64
|sequence| is a monotonically increasing sequence number for the Item, which is set when the Item is inserted into the tree. In practice, this is the journal file offset at the time of committing the transaction containing the Item. Note that two or more Items may share the same |sequence|.
Implementations§
Source§impl Item<ObjectKeyV43, ObjectValueV41>
impl Item<ObjectKeyV43, ObjectValueV41>
pub fn is_tombstone(&self) -> bool
Trait Implementations§
Source§impl<'de, K, V> Deserialize<'de> for Item<K, V>where
K: Deserialize<'de>,
V: Deserialize<'de>,
impl<'de, K, V> Deserialize<'de> for Item<K, V>where
K: Deserialize<'de>,
V: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Item<ObjectKeyV40, ObjectValueV40>> for ObjectItemV41
impl From<Item<ObjectKeyV40, ObjectValueV40>> for ObjectItemV41
Source§fn from(item: ObjectItemV40) -> Self
fn from(item: ObjectItemV40) -> Self
Converts to this type from the input type.
Source§impl From<Item<ObjectKeyV40, ObjectValueV41>> for ObjectItemV43
impl From<Item<ObjectKeyV40, ObjectValueV41>> for ObjectItemV43
Source§fn from(item: ObjectItemV41) -> Self
fn from(item: ObjectItemV41) -> Self
Converts to this type from the input type.
Source§impl<K: TypeFingerprint, V: TypeFingerprint> TypeFingerprint for Item<K, V>
impl<K: TypeFingerprint, V: TypeFingerprint> TypeFingerprint for Item<K, V>
fn fingerprint() -> String
impl<K: Copy, V: Copy> Copy for Item<K, V>
impl<K: Eq, V: Eq> Eq for Item<K, V>
impl<K, V> StructuralPartialEq for Item<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for Item<K, V>
impl<K, V> RefUnwindSafe for Item<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Item<K, V>
impl<K, V> Sync for Item<K, V>
impl<K, V> Unpin for Item<K, V>
impl<K, V> UnwindSafe for Item<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§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