commonware_utils/bitmap/historical/
error.rs

1/// Errors that can occur in Historical bitmap operations.
2#[derive(Clone, Debug, PartialEq, Eq, thiserror::Error)]
3pub enum Error {
4    /// Commit numbers must be strictly monotonically increasing.
5    #[error("commit number ({attempted}) <= previous commit ({previous})")]
6    NonMonotonicCommit { previous: u64, attempted: u64 },
7
8    /// Commit number u64::MAX is reserved and cannot be used.
9    #[error("commit number u64::MAX is reserved and cannot be used")]
10    ReservedCommitNumber,
11
12    /// Error from the underlying Prunable bitmap.
13    #[error("prunable error: {0}")]
14    Prunable(#[from] crate::bitmap::prunable::Error),
15}