hlc_gen/
error.rs

1/// HLC error type.
2#[derive(Debug, PartialEq, thiserror::Error)]
3pub enum HlcError {
4    /// Timestamp is out of range.
5    #[error("Out of range timestamp")]
6    OutOfRangeTimestamp,
7
8    /// Drift is too large.
9    #[error("Drift exeeded the maximum allowed: {0} > {1}")]
10    DriftTooLarge(usize, usize),
11}
12
13/// HLC result type.
14pub type HlcResult<T> = Result<T, HlcError>;