#[non_exhaustive]pub struct DecrementOptions {
pub expiry: Option<Duration>,
pub initial: Option<u64>,
pub delta: Option<u64>,
pub durability_level: Option<DurabilityLevel>,
pub retry_strategy: Option<Arc<dyn RetryStrategy>>,
}Expand description
Options for BinaryCollection::decrement.
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.expiry: Option<Duration>Document expiry time.
initial: Option<u64>Initial value if the counter document does not exist.
delta: Option<u64>Amount to decrement by. Defaults to 1.
durability_level: Option<DurabilityLevel>Durability level for this mutation.
retry_strategy: Option<Arc<dyn RetryStrategy>>Override the default retry strategy for this operation.
Implementations§
Source§impl DecrementOptions
impl DecrementOptions
Sourcepub fn initial(self, initial: u64) -> Self
pub fn initial(self, initial: u64) -> Self
Sets the initial value if the counter document does not exist.
Sourcepub fn durability_level(
self,
durability_level: impl Into<DurabilityLevel>,
) -> Self
pub fn durability_level( self, durability_level: impl Into<DurabilityLevel>, ) -> Self
Sets the durability level for this mutation.
Sourcepub fn retry_strategy(self, retry_strategy: Arc<dyn RetryStrategy>) -> Self
pub fn retry_strategy(self, retry_strategy: Arc<dyn RetryStrategy>) -> Self
Sets a custom retry strategy for this operation.
Trait Implementations§
Source§impl Clone for DecrementOptions
impl Clone for DecrementOptions
Source§fn clone(&self) -> DecrementOptions
fn clone(&self) -> DecrementOptions
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 DecrementOptions
impl Debug for DecrementOptions
Source§impl Default for DecrementOptions
impl Default for DecrementOptions
Source§fn default() -> DecrementOptions
fn default() -> DecrementOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DecrementOptions
impl !RefUnwindSafe for DecrementOptions
impl Send for DecrementOptions
impl Sync for DecrementOptions
impl Unpin for DecrementOptions
impl UnsafeUnpin for DecrementOptions
impl !UnwindSafe for DecrementOptions
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