1use thiserror::Error;
7
8pub type Result<T> = std::result::Result<T, Error>;
10
11#[derive(Debug, Error)]
13pub enum Error {
14 #[error("cannot get empty secret")]
15 GetEmptySecretError,
16 #[cfg(feature = "command")]
17 #[error("cannot get secret from command")]
18 GetSecretFromCommand(#[source] process::Error),
19 #[cfg(feature = "command")]
20 #[error("cannot get secret from command: empty output")]
21 GetSecretFromCommandEmptyOutputError,
22
23 #[cfg(feature = "keyring")]
24 #[error(transparent)]
25 KeyringError(#[from] keyring::Error),
26}