pub enum InitError {
BadMagic {
actual: [u8; 3],
expected: [u8; 3],
},
IncompatibleVersion(u8),
InvalidLayout,
OutOfMemory,
}Expand description
Error returned when RoaringBitmap::init rejects stable memory contents.
Variants§
BadMagic
The first three bytes were not the expected RSB magic (see the crate::bitmap layout).
IncompatibleVersion(u8)
Header layout version is not supported by this build.
InvalidLayout
Catch-all for inconsistent header fields, snapshot length vs. memory size, corrupted snapshot bytes, or journal records that fail validation during replay.
This includes a journal slot count in the header (offset 12) that does not equal
the build-time journal capacity—for example opening stable memory written by a build compiled
with a different journal capacity.
OutOfMemory
RoaringBitmap::init on empty memory calls RoaringBitmap::new; bootstrap failures there
(usually BitmapError::GrowFailed) are returned as this variant.
Trait Implementations§
impl Eq for InitError
Source§impl Error for InitError
impl Error for InitError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()