Skip to main content

StoreErrorPredicates

Trait StoreErrorPredicates 

Source
pub trait StoreErrorPredicates {
    // Required methods
    fn is_key_not_found(&self) -> bool;
    fn is_already_exists(&self) -> bool;
}
Expand description

Predicates that classify store errors into common semantic buckets.

This is used by result extension methods (e.g. optional, idempotent) to treat certain expected error conditions as benign outcomes.

Required Methods§

Source

fn is_key_not_found(&self) -> bool

Returns true if this error represents a missing entry (e.g. key not found).

Source

fn is_already_exists(&self) -> bool

Returns true if this error represents a duplicate write (e.g. key/hash already exists).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§