pub enum LayoutError {
NoModules,
NoHashes,
NoBits,
InvalidFalsePositiveRate {
rate: f64,
},
Overflow {
modules: u32,
words_per_module: u32,
},
SizingOverflow {
estimated_keys: u64,
target_false_positive_rate: f64,
modules: u32,
},
}Expand description
Rejects a ModuleLayout that cannot describe a
usable filter.
Variants§
NoModules
A filter must have at least one module.
NoHashes
Each module must hash every key at least once.
NoBits
Each module must hold at least one word of bits.
InvalidFalsePositiveRate
A false positive rate is only meaningful strictly between 0 and 1.
Overflow
The filter is too large to describe or to address.
A module’s own size is bounded by the u32 it is counted in, so this
reports the whole filter overflowing rather than one module.
SizingOverflow
Returned by ModuleLayout::for_keys
when the module size it derives from these three values is too large to
describe. Raising modules, or the target rate, brings it back in range.
Trait Implementations§
Source§impl Clone for LayoutError
impl Clone for LayoutError
impl Copy for LayoutError
Source§impl Debug for LayoutError
impl Debug for LayoutError
Source§impl Display for LayoutError
impl Display for LayoutError
Source§impl Error for LayoutError
impl Error for LayoutError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for LayoutError
impl PartialEq for LayoutError
impl StructuralPartialEq for LayoutError
Auto Trait Implementations§
impl Freeze for LayoutError
impl RefUnwindSafe for LayoutError
impl Send for LayoutError
impl Sync for LayoutError
impl Unpin for LayoutError
impl UnsafeUnpin for LayoutError
impl UnwindSafe for LayoutError
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