pub enum SegmentError {
TooShort {
got: usize,
need: usize,
},
BadMagic {
got: [u8; 8],
},
BadShape(String),
BadCrc {
expected: u32,
got: u32,
},
BloomError(BloomError),
UnsortedKey {
prev: u64,
next: u64,
},
KeyNotInPage {
key: u64,
},
PageOutOfRange {
got: u32,
num_pages: u32,
},
CompressionDecodeFailed(String),
UnknownCompressionAlgo(u8),
}Expand description
Errors surfaced by the segment reader. Includes the inner
BloomError since the bloom is parsed during open.
Variants§
TooShort
BadMagic
BadShape(String)
BadCrc
BloomError(BloomError)
UnsortedKey
KeyNotInPage
PageOutOfRange
Caller asked for a page outside [0, num_pages).
CompressionDecodeFailed(String)
v6.6.2 — v2 envelope’s inner LZSS payload failed to
decompress. The contained string is the underlying
LzssError rendered.
UnknownCompressionAlgo(u8)
v6.6.2 — v2 envelope declares an unknown compression algo byte. Refuse to read forward without knowing how to interpret the inner bytes.
Trait Implementations§
Source§impl Debug for SegmentError
impl Debug for SegmentError
Source§impl Display for SegmentError
impl Display for SegmentError
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.
Auto Trait Implementations§
impl Freeze for SegmentError
impl RefUnwindSafe for SegmentError
impl Send for SegmentError
impl Sync for SegmentError
impl Unpin for SegmentError
impl UnsafeUnpin for SegmentError
impl UnwindSafe for SegmentError
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