pub struct Record {
pub key: Vec<u8>,
pub ts: i64,
pub expire_at: i64,
pub value: Vec<u8>,
}Expand description
A single key-value record in the LSM engine.
Each record has a binary key, a microsecond-precision ts timestamp,
an expire_at time (in microseconds since epoch), and a binary value.
Records with expire_at <= now are skipped by queries and eventually
garbage-collected.
Fields§
§key: Vec<u8>Binary key. Use Record::key_str for lossy UTF-8 display.
ts: i64Microsecond timestamp (e.g. SystemTime::now() as microseconds since Unix epoch).
expire_at: i64Expiration time in microseconds since Unix epoch.
Use i64::MAX for records that should never expire.
value: Vec<u8>Binary payload. Any byte sequence is accepted.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Record
impl<'de> Deserialize<'de> for Record
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
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnsafeUnpin for Record
impl UnwindSafe for Record
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