pub struct MVCCStorage { /* private fields */ }Expand description
MVCC storage for versioned data
Implementations§
Source§impl MVCCStorage
impl MVCCStorage
Sourcepub fn new() -> MVCCStorage
pub fn new() -> MVCCStorage
Create new MVCC storage
Sourcepub fn read(
&self,
key: &[u8],
snapshot_ts: u64,
txn_id: u64,
) -> Result<Option<Vec<u8>>, Error>
pub fn read( &self, key: &[u8], snapshot_ts: u64, txn_id: u64, ) -> Result<Option<Vec<u8>>, Error>
Read a key with MVCC snapshot isolation
Sourcepub fn write(
&self,
key: Vec<u8>,
value: Vec<u8>,
txn_id: u64,
timestamp: u64,
) -> Result<(), Error>
pub fn write( &self, key: Vec<u8>, value: Vec<u8>, txn_id: u64, timestamp: u64, ) -> Result<(), Error>
Write a key (creates a new version)
Sourcepub fn delete(
&self,
key: &[u8],
txn_id: u64,
timestamp: u64,
) -> Result<(), Error>
pub fn delete( &self, key: &[u8], txn_id: u64, timestamp: u64, ) -> Result<(), Error>
Delete a key (creates a delete marker)
Trait Implementations§
Source§impl Default for MVCCStorage
impl Default for MVCCStorage
Source§fn default() -> MVCCStorage
fn default() -> MVCCStorage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MVCCStorage
impl RefUnwindSafe for MVCCStorage
impl Send for MVCCStorage
impl Sync for MVCCStorage
impl Unpin for MVCCStorage
impl UnwindSafe for MVCCStorage
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