pub struct Value {
pub key: UserKey,
pub value: UserValue,
pub seqno: SeqNo,
pub value_type: ValueType,
}
Expand description
Represents a value in the LSM-tree
key
and value
are arbitrary user-defined byte arrays
Disk representation
[seqno; 8 bytes] [tombstone; 1 byte] [key length; 2 bytes] [key; N bytes] [value length; 4 bytes] [value: N bytes]
Fields§
§key: UserKey
User-defined key - an arbitrary byte array
Supports up to 2^16 bytes
value: UserValue
User-defined value - an arbitrary byte array
Supports up to 2^32 bytes
seqno: SeqNo
Sequence number
value_type: ValueType
Tombstone marker - if this is true, the value has been deleted
Implementations§
Trait Implementations§
source§impl Ord for Value
impl Ord for Value
source§impl PartialEq for Value
impl PartialEq for Value
source§impl PartialOrd for Value
impl PartialOrd for Value
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 Eq for Value
impl StructuralEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.