pub enum BloomError {
TooShort {
got: usize,
need: usize,
},
BadMagic {
got: u32,
},
BadShape(String),
BadCrc {
expected: u32,
got: u32,
},
BadNumHashes {
got: u32,
},
}Expand description
Errors surfaced by BloomFilter::from_bytes when the byte slice
doesn’t match the v1 layout. All variants carry enough context
for the caller to log a precise reason.
Variants§
TooShort
Byte slice was shorter than the fixed header.
BadMagic
First four bytes weren’t BLOOM_MAGIC.
BadShape(String)
num_bits field wasn’t a multiple of 64, or 0, or
inconsistent with the trailing bit-word count.
BadCrc
CRC over the body didn’t match the stored CRC.
BadNumHashes
num_hashes was zero or exceeded NUM_HASHES_MAX.
Trait Implementations§
Source§impl Debug for BloomError
impl Debug for BloomError
Source§impl Display for BloomError
impl Display for BloomError
impl Eq for BloomError
Source§impl From<BloomError> for SegmentError
impl From<BloomError> for SegmentError
Source§fn from(e: BloomError) -> Self
fn from(e: BloomError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BloomError
impl PartialEq for BloomError
impl StructuralPartialEq for BloomError
Auto Trait Implementations§
impl Freeze for BloomError
impl RefUnwindSafe for BloomError
impl Send for BloomError
impl Sync for BloomError
impl Unpin for BloomError
impl UnsafeUnpin for BloomError
impl UnwindSafe for BloomError
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