pub enum KeyValueResponse {
Get {
value: Value,
},
Set {
previous: Value,
},
Delete {
previous: Value,
},
Exists {
is_present: bool,
},
ListKeys {
keys: Vec<String>,
next_cursor: u64,
},
}
Variants§
Get
Response to a KeyValueOperation::Get
,
returning the value stored under the key, which may be empty
Set
Response to a KeyValueOperation::Set
,
returning the value that was previously stored under the key, may be empty
Delete
Response to a KeyValueOperation::Delete
,
returning the value that was previously stored under the key, may be empty
Exists
Response to a KeyValueOperation::Exists
,
returning whether the key is present in the store
ListKeys
Response to a KeyValueOperation::ListKeys
,
returning a list of keys that start with the prefix, and a cursor to continue listing
if there are more keys
Note: the cursor is 0 if there are no more keys
Trait Implementations§
Source§impl Clone for KeyValueResponse
impl Clone for KeyValueResponse
Source§fn clone(&self) -> KeyValueResponse
fn clone(&self) -> KeyValueResponse
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 KeyValueResponse
impl Debug for KeyValueResponse
Source§impl<'de> Deserialize<'de> for KeyValueResponse
impl<'de> Deserialize<'de> for KeyValueResponse
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 PartialEq for KeyValueResponse
impl PartialEq for KeyValueResponse
Source§impl Serialize for KeyValueResponse
impl Serialize for KeyValueResponse
impl Eq for KeyValueResponse
impl StructuralPartialEq for KeyValueResponse
Auto Trait Implementations§
impl Freeze for KeyValueResponse
impl RefUnwindSafe for KeyValueResponse
impl Send for KeyValueResponse
impl Sync for KeyValueResponse
impl Unpin for KeyValueResponse
impl UnwindSafe for KeyValueResponse
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