pub enum TransactionOperation {
Read {
key: String,
shard_id: String,
},
Write {
key: String,
value: Vec<u8>,
shard_id: String,
},
Delete {
key: String,
shard_id: String,
},
CompareAndSwap {
key: String,
expected: Option<Vec<u8>>,
new_value: Vec<u8>,
shard_id: String,
},
}Expand description
An operation within a distributed transaction.
Variants§
Read
Read operation.
Write
Write operation.
Delete
Delete operation.
CompareAndSwap
Compare and swap operation.
Implementations§
Trait Implementations§
Source§impl Clone for TransactionOperation
impl Clone for TransactionOperation
Source§fn clone(&self) -> TransactionOperation
fn clone(&self) -> TransactionOperation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransactionOperation
impl Debug for TransactionOperation
Source§impl<'de> Deserialize<'de> for TransactionOperation
impl<'de> Deserialize<'de> for TransactionOperation
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 TransactionOperation
impl RefUnwindSafe for TransactionOperation
impl Send for TransactionOperation
impl Sync for TransactionOperation
impl Unpin for TransactionOperation
impl UnsafeUnpin for TransactionOperation
impl UnwindSafe for TransactionOperation
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