#[non_exhaustive]pub enum RejectionReason {
EnoughSpaceIsNotAvailableAndKeyFailedToEvictOthers,
KeyWeightIsGreaterThanCacheWeight,
KeyDoesNotExist,
KeyAlreadyExists,
}Expand description
RejectionReason defines the reason for a command getting rejected. Available since v0.0.3.
EnoughSpaceIsNotAvailableAndKeyFailedToEvictOthers: If the cache weight is full, and the incoming key can not evict others.
KeyWeightIsGreaterThanCacheWeight: The weight of the incoming key is greater than the total cache weight.
KeyDoesNotExist: Key does not exist during delete operation.
KeyAlreadyExists: Key already exists during put operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
EnoughSpaceIsNotAvailableAndKeyFailedToEvictOthers
KeyWeightIsGreaterThanCacheWeight
KeyDoesNotExist
KeyAlreadyExists
Trait Implementations§
Source§impl Clone for RejectionReason
impl Clone for RejectionReason
Source§fn clone(&self) -> RejectionReason
fn clone(&self) -> RejectionReason
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 RejectionReason
impl Debug for RejectionReason
Source§impl PartialEq for RejectionReason
impl PartialEq for RejectionReason
impl Copy for RejectionReason
impl Eq for RejectionReason
impl StructuralPartialEq for RejectionReason
Auto Trait Implementations§
impl Freeze for RejectionReason
impl RefUnwindSafe for RejectionReason
impl Send for RejectionReason
impl Sync for RejectionReason
impl Unpin for RejectionReason
impl UnwindSafe for RejectionReason
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