pub enum IndexRejection {
Unparseable,
CountMismatch {
listed: usize,
found: usize,
},
FirstOffsetMismatch {
listed: u64,
actual: u64,
},
NotBlockMagic {
offset: u64,
},
NotMonotonic,
LastBlockNotAdjacent,
}Expand description
Why a block index was rejected.
The standard tells libraries to be conservative here: addressing the wrong part of a file on the strength of a stale index is worse than rebuilding it.
Variants§
Unparseable
The index YAML could not be parsed as a list of integers.
CountMismatch
The index listed a different number of blocks than the file contains.
FirstOffsetMismatch
The first offset did not point at the first block. This catches the common case of a tree edited by hand without updating the index.
NotBlockMagic
An offset did not point at block magic.
NotMonotonic
Offsets were not monotonically increasing, so the index could not be rebuilt by skipping along.
LastBlockNotAdjacent
The last block’s allocated space was not immediately followed by the index.
Trait Implementations§
Source§impl Clone for IndexRejection
impl Clone for IndexRejection
Source§fn clone(&self) -> IndexRejection
fn clone(&self) -> IndexRejection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexRejection
impl Debug for IndexRejection
impl Eq for IndexRejection
Source§impl PartialEq for IndexRejection
impl PartialEq for IndexRejection
impl StructuralPartialEq for IndexRejection
Auto Trait Implementations§
impl Freeze for IndexRejection
impl RefUnwindSafe for IndexRejection
impl Send for IndexRejection
impl Sync for IndexRejection
impl Unpin for IndexRejection
impl UnsafeUnpin for IndexRejection
impl UnwindSafe for IndexRejection
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