pub enum KeyValueOperation {
Get {
key: String,
},
Set {
key: String,
value: Vec<u8>,
},
Delete {
key: String,
},
Exists {
key: String,
},
ListKeys {
prefix: String,
cursor: u64,
},
}
Expand description
Supported operations
Variants§
Get
Read bytes stored under a key
Set
Write bytes under a key
Delete
Remove a key and its value
Exists
Test if a key exists
ListKeys
Fields
§
cursor: u64
The cursor to start listing from, or 0 to start from the beginning.
If there are more keys to list, the response will include a new cursor.
If there are no more keys, the response will include a cursor of 0.
The cursor is opaque to the caller, and should be passed back to the
ListKeys
operation to continue listing keys.
If the cursor is not found for the specified prefix, the response will include
a KeyValueError::CursorNotFound
error.
Trait Implementations§
Source§impl Clone for KeyValueOperation
impl Clone for KeyValueOperation
Source§fn clone(&self) -> KeyValueOperation
fn clone(&self) -> KeyValueOperation
Returns a copy 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 KeyValueOperation
impl Debug for KeyValueOperation
Source§impl<'de> Deserialize<'de> for KeyValueOperation
impl<'de> Deserialize<'de> for KeyValueOperation
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 Operation for KeyValueOperation
impl Operation for KeyValueOperation
Source§type Output = KeyValueResult
type Output = KeyValueResult
Output
assigns the type this request results in.Source§impl PartialEq for KeyValueOperation
impl PartialEq for KeyValueOperation
Source§impl Serialize for KeyValueOperation
impl Serialize for KeyValueOperation
impl Eq for KeyValueOperation
impl StructuralPartialEq for KeyValueOperation
Auto Trait Implementations§
impl Freeze for KeyValueOperation
impl RefUnwindSafe for KeyValueOperation
impl Send for KeyValueOperation
impl Sync for KeyValueOperation
impl Unpin for KeyValueOperation
impl UnwindSafe for KeyValueOperation
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