liserk_client/
error.rs

1use config::ConfigError;
2use liserk_shared::message_type::MessageTypeError;
3
4/// Enum representing the possible errors that can be encountered by the client.
5#[derive(Debug, thiserror::Error)]
6#[error("...")]
7pub enum Error {
8    /// Represents an I/O error from the Tokio runtime.
9    TokioIoError(#[from] tokio::io::Error),
10
11    /// Represents a configuration error.
12    ConfigError(#[from] ConfigError),
13
14    /// Represents an error encountered during serialization using CBOR format.
15    SerializationError(#[from] serde_cbor::Error),
16
17    /// Represents an error regarding the type of message.
18    MessageTypeError(#[from] MessageTypeError),
19
20    /// Represents an encryption error when using AES-GCM-SIV.
21    EcryptionError(AesError),
22}
23
24#[derive(Debug)]
25pub enum AesError {
26    Encrypt,
27    Decrypt,
28}