holochain_secure_primitive/
types.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// Errors related to the secure primitive macro.
#[derive(Debug)]
pub enum SecurePrimitiveError {
    /// We have the wrong number of bytes.
    BadSize,
}
impl std::error::Error for SecurePrimitiveError {}
impl core::fmt::Display for SecurePrimitiveError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            SecurePrimitiveError::BadSize => write!(f, "Bad sized secure primitive."),
        }
    }
}