pub struct StateOpResult {
pub found: bool,
pub value: Option<Vec<u8>>,
pub version: Option<u64>,
pub keys: Option<Vec<String>>,
pub error: Option<String>,
}Expand description
Result of a state operation.
Fields§
§found: boolWhether the key was found (for Get) or operation succeeded.
value: Option<Vec<u8>>Returned value bytes (for Get).
version: Option<u64>Current version / etag if the backend supports it.
keys: Option<Vec<String>>Matched keys for List operations.
error: Option<String>Error message if the operation failed.
Implementations§
Source§impl StateOpResult
impl StateOpResult
Sourcepub fn with_version(self, version: u64) -> Self
pub fn with_version(self, version: u64) -> Self
Sets the version on this result.
Trait Implementations§
Source§impl Clone for StateOpResult
impl Clone for StateOpResult
Source§fn clone(&self) -> StateOpResult
fn clone(&self) -> StateOpResult
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 StateOpResult
impl Debug for StateOpResult
Source§impl<'de> Deserialize<'de> for StateOpResult
impl<'de> Deserialize<'de> for StateOpResult
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 StateOpResult
impl PartialEq for StateOpResult
Source§impl Serialize for StateOpResult
impl Serialize for StateOpResult
impl Eq for StateOpResult
impl StructuralPartialEq for StateOpResult
Auto Trait Implementations§
impl Freeze for StateOpResult
impl RefUnwindSafe for StateOpResult
impl Send for StateOpResult
impl Sync for StateOpResult
impl Unpin for StateOpResult
impl UnsafeUnpin for StateOpResult
impl UnwindSafe for StateOpResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.