1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use thiserror::Error;

#[derive(Debug, Error)]
pub enum ShmapError {
    #[error("shm file not found")]
    ShmFileNotFound,

    #[error("CStringNulError: {}", _0)]
    CStringNulError(#[from] std::ffi::NulError),

    #[error("BincodeDecodeError: {}", _0)]
    BincodeDecodeError(#[from] bincode::error::DecodeError),

    #[error("BincodeEncodeError: {}", _0)]
    BincodeEncodeError(#[from] bincode::error::EncodeError),

    #[error("IO Error: {}", _0)]
    IOError(#[from] std::io::Error),

    #[error("NamedLockError: {}", _0)]
    NamedLockError(#[from] named_lock::Error),

    #[error("DurationOutOfRangeError")]
    DurationOutOfRangeError,

    #[error("AesGcmError: {}", _0)]
    AesGcmError(#[from] aes_gcm::Error),
}