pub enum CasStoreResult {
Stored {
generation: u64,
},
Conflict {
current_generation: u64,
current_value: Option<Vec<u8>>,
},
Failed(String),
}Expand description
Outcome of a ChatDelegateRequestMsg::CasStoreRequest.
Variants§
Stored
The compare-and-swap succeeded; carries the new generation after the write (the caller should remember it for its next store).
Conflict
Generation mismatch — the store was rejected because another
writer advanced the key first. Carries the current generation and
value so the caller can merge its pending changes and retry with
expected_generation = current_generation.
Failed(String)
The host-function store failed (e.g. secret storage error).
Trait Implementations§
Source§impl Clone for CasStoreResult
impl Clone for CasStoreResult
Source§fn clone(&self) -> CasStoreResult
fn clone(&self) -> CasStoreResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CasStoreResult
impl Debug for CasStoreResult
Source§impl<'de> Deserialize<'de> for CasStoreResult
impl<'de> Deserialize<'de> for CasStoreResult
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
impl Eq for CasStoreResult
Source§impl PartialEq for CasStoreResult
impl PartialEq for CasStoreResult
Source§impl Serialize for CasStoreResult
impl Serialize for CasStoreResult
impl StructuralPartialEq for CasStoreResult
Auto Trait Implementations§
impl Freeze for CasStoreResult
impl RefUnwindSafe for CasStoreResult
impl Send for CasStoreResult
impl Sync for CasStoreResult
impl Unpin for CasStoreResult
impl UnsafeUnpin for CasStoreResult
impl UnwindSafe for CasStoreResult
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