decaf377_fmd/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

/// An error in message detection.
#[derive(Clone, Error, Debug)]
pub enum Error {
    /// Clue creation for larger than maximum precision was requested.
    #[error("Precision {0} is larger than `MAX_PRECISION` or current key expansion.")]
    PrecisionTooLarge(u64),
    /// An address encoding was invalid.
    #[error("Invalid address.")]
    InvalidAddress,
    /// A detection key encoding was invalid.
    #[error("Invalid detection key.")]
    InvalidDetectionKey,
    /// A clue key encoding was invalid.
    #[error("Invalid clue key.")]
    InvalidClueKey,
}