pub enum Error {
TooShort,
BadMagic,
BadPageSize(u32),
PageOutOfRange(u32),
NotATablePage(u8),
TruncatedCell,
TooManyPages,
MalformedFreelist,
MalformedOverflow,
}Expand description
Errors that can arise while reading a SQLite database, all recoverable —
the reader never panics on malformed input.
Variants§
TooShort
File is shorter than the 100-byte header.
BadMagic
First 16 bytes are not the SQLite format 3\0 magic.
BadPageSize(u32)
Page-size field is not a power of two in [512, 65536].
PageOutOfRange(u32)
A page number referenced by the b-tree is out of range for the file.
NotATablePage(u8)
A b-tree page had an unexpected type byte where a table page was required.
TruncatedCell
A cell pointer or payload ran past the end of its page.
TooManyPages
The b-tree was deeper / wider than the safety cap allows.
MalformedFreelist
The freelist trunk chain cycled or exceeded the file’s page count.
MalformedOverflow
An overflow-page chain cycled or exceeded the file’s page count.
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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