1use thiserror::Error;
7
8use crate::native;
9
10pub type Result<T> = std::result::Result<T, Error>;
12
13#[derive(Debug, Error)]
15pub enum Error {
16 #[error("cannot build keyring entry using key `{1}`")]
17 BuildEntryError(#[source] native::Error, String),
18 #[error("cannot get secret from keyring matching `{1}`")]
19 GetSecretError(#[source] native::Error, String),
20 #[error("cannot find secret from keyring matching `{1}`")]
21 FindSecretError(#[source] native::Error, String),
22 #[error("cannot set secret from keyring matching `{1}`")]
23 SetSecretError(#[source] native::Error, String),
24 #[error("cannot delete secret from keyring matching `{1}`")]
25 DeleteSecretError(#[source] native::Error, String),
26
27 #[cfg(feature = "tokio")]
28 #[error(transparent)]
29 JoinError(#[from] tokio::task::JoinError),
30}