1use thiserror::Error;
2
3#[derive(Error, Debug, PartialEq, Eq)]
4pub enum PortalError {
5 #[error("Value doesn't exist")]
6 NoneError,
7 #[error("Provided filename doesn't return a base filename")]
8 BadFileName,
9 #[error("Provided outdir is not a directory")]
10 BadDirectory,
11 #[error("Cancelled")]
12 Cancelled,
13 #[error("Incomplete")]
14 Incomplete,
15 #[error("Underlying crypto error")]
16 CryptoError,
17 #[error("Incorrect Mutability")]
18 Mutability,
19 #[error("Provided storage is too small")]
20 BufferTooSmall,
21 #[error("Bad registration")]
22 BadRegistration,
23 #[error("No state initialized")]
24 BadState,
25 #[error("No peer confirmed")]
26 NoPeer,
27 #[error("KeyDerivationFailed")]
28 BadMsg,
29 #[error("EncryptError")]
30 PeerKeyMismatch,
31 #[error("EncryptError")]
32 EncryptError,
33 #[error("DecryptError")]
34 DecryptError,
35 #[error("IOError")]
36 IOError,
37 #[error("Interrupted")]
38 Interrupted,
39 #[error("WouldBlock")]
40 WouldBlock,
41 #[error("Object could not be serialized")]
42 SerializeError,
43}