forked from sigp/milhouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.rs
More file actions
44 lines (42 loc) · 1.28 KB
/
error.rs
File metadata and controls
44 lines (42 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use std::fmt::{Display, Error as FmtError, Formatter};
#[derive(Debug, PartialEq, Clone)]
pub enum Error {
OutOfBoundsUpdate { index: usize, len: usize },
OutOfBoundsIterFrom { index: usize, len: usize },
ListFull { len: usize },
PackedLeafFull { len: usize },
LeafUpdateMissing { index: usize },
PackedLeafOutOfBounds { sub_index: usize, len: usize },
NodeUpdatesMissing { prefix: usize },
InvalidListUpdate,
InvalidVectorUpdate,
WrongVectorLength { len: usize, expected: usize },
PushNotSupported,
UpdateLeafError,
UpdateLeavesError,
InvalidRebaseNode,
InvalidRebaseLeaf,
BuilderInvalidDepth { depth: usize },
BuilderExpectedLeaf,
BuilderStackEmptyMerge,
BuilderStackEmptyMergeLeft,
BuilderStackEmptyMergeRight,
BuilderStackEmptyFinish,
BuilderStackEmptyFinishLeft,
BuilderStackEmptyFinishRight,
BuilderStackEmptyFinalize,
BuilderStackLeftover,
BuilderFull,
BulkUpdateUnclean,
CowMissingEntry,
LevelIterPendingUpdates,
IntraRebaseZeroHash,
IntraRebaseZeroDepth,
IntraRebaseRepeatVisit,
InvalidLengthFromParts { length: usize, max_length: usize },
}
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
write!(f, "{self:?}")
}
}