pub enum CapacityExhaustedBehavior {
Silent,
Error,
Panic,
}Expand description
What happens when the filter reaches MAX_FILTERS and cannot grow further.
Capacity exhaustion is a structural limit, not a transient error: once
MAX_FILTERS sub-filters exist, no new ones can be added regardless of fill rate.
Insertions that would require a new filter instead go into the last sub-filter,
increasing its FPR beyond the configured target.
Variants§
Silent
Continue inserting into the saturated last filter.
The FPR degrades silently but no error is returned. Appropriate for workloads where data loss is worse than a degraded FPR.
Error
Return Err(BloomCraftError::MaxFiltersExceeded)
from insert_checked.
insert (the infallible variant) ignores this setting and behaves as
Silent. Use insert_checked consistently if you want error propagation.
Panic
Panic immediately.
Only available in debug builds. Use in tests to surface capacity exhaustion as a hard failure rather than a silently degraded filter.
Trait Implementations§
Source§impl Clone for CapacityExhaustedBehavior
impl Clone for CapacityExhaustedBehavior
Source§fn clone(&self) -> CapacityExhaustedBehavior
fn clone(&self) -> CapacityExhaustedBehavior
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CapacityExhaustedBehavior
Source§impl Debug for CapacityExhaustedBehavior
impl Debug for CapacityExhaustedBehavior
Source§impl Default for CapacityExhaustedBehavior
impl Default for CapacityExhaustedBehavior
Source§fn default() -> CapacityExhaustedBehavior
fn default() -> CapacityExhaustedBehavior
Source§impl<'de> Deserialize<'de> for CapacityExhaustedBehavior
impl<'de> Deserialize<'de> for CapacityExhaustedBehavior
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>,
impl Eq for CapacityExhaustedBehavior
Source§impl PartialEq for CapacityExhaustedBehavior
impl PartialEq for CapacityExhaustedBehavior
Source§fn eq(&self, other: &CapacityExhaustedBehavior) -> bool
fn eq(&self, other: &CapacityExhaustedBehavior) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CapacityExhaustedBehavior
Auto Trait Implementations§
impl Freeze for CapacityExhaustedBehavior
impl RefUnwindSafe for CapacityExhaustedBehavior
impl Send for CapacityExhaustedBehavior
impl Sync for CapacityExhaustedBehavior
impl Unpin for CapacityExhaustedBehavior
impl UnsafeUnpin for CapacityExhaustedBehavior
impl UnwindSafe for CapacityExhaustedBehavior
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more