#[non_exhaustive]pub struct ConditionalSetOutcome {
pub matched: bool,
pub previous_total: u64,
pub current_total: u64,
}Expand description
Result of a conditional total update.
Distinguishes comparator misses from successful updates that leave total unchanged.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.matched: boolWhether comparator matched and update semantics were applied.
previous_total: u64Live total observed before conditional update.
current_total: u64Live total after operation, or unchanged total when comparator missed.
Trait Implementations§
Source§impl Clone for ConditionalSetOutcome
impl Clone for ConditionalSetOutcome
Source§fn clone(&self) -> ConditionalSetOutcome
fn clone(&self) -> ConditionalSetOutcome
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 moreimpl Copy for ConditionalSetOutcome
Source§impl Debug for ConditionalSetOutcome
impl Debug for ConditionalSetOutcome
impl Eq for ConditionalSetOutcome
Source§impl PartialEq for ConditionalSetOutcome
impl PartialEq for ConditionalSetOutcome
impl StructuralPartialEq for ConditionalSetOutcome
Auto Trait Implementations§
impl Freeze for ConditionalSetOutcome
impl RefUnwindSafe for ConditionalSetOutcome
impl Send for ConditionalSetOutcome
impl Sync for ConditionalSetOutcome
impl Unpin for ConditionalSetOutcome
impl UnsafeUnpin for ConditionalSetOutcome
impl UnwindSafe for ConditionalSetOutcome
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