commonware_storage/journal/
mod.rs1use thiserror::Error;
9
10pub mod fixed;
11pub mod variable;
12
13#[derive(Debug, Error)]
15pub enum Error {
16 #[error("runtime error: {0}")]
17 Runtime(#[from] commonware_runtime::Error),
18 #[error("invalid blob name: {0}")]
19 InvalidBlobName(String),
20 #[error("checksum mismatch: expected={0} actual={1}")]
21 ChecksumMismatch(u32, u32),
22 #[error("item too large: size={0}")]
23 ItemTooLarge(usize),
24 #[error("already pruned to section: {0}")]
25 AlreadyPrunedToSection(u64),
26 #[error("usize too small")]
27 UsizeTooSmall,
28 #[error("offset overflow")]
29 OffsetOverflow,
30 #[error("unexpected size: expected={0} actual={1}")]
31 UnexpectedSize(u32, u32),
32 #[error("missing blob: {0}")]
33 MissingBlob(u64),
34 #[error("item pruned: {0}")]
35 ItemPruned(u64),
36 #[error("invalid item: {0}")]
37 InvalidItem(u64),
38 #[error("invalid rewind: {0}")]
39 InvalidRewind(u64),
40}