#[non_exhaustive]pub enum KeepError {
Show 35 variants
InvalidPassword,
RateLimited(u64),
DecryptionFailed,
KeyNotFound(String),
KeyAlreadyExists(String),
InvalidMnemonic(String),
InvalidNsec,
InvalidNpub(String),
KeyringFull(usize),
Locked,
AlreadyExists(String),
NotFound(String),
InvalidNetwork(String),
RotationFailed(String),
AuditWriteFailed(String),
Encryption(String),
Database(String),
VaultAlreadyOpen(String),
Migration(String),
HomeNotFound,
PermissionDenied(String),
UserRejected,
InvalidInput(String),
NotImplemented(String),
Runtime(String),
Config(String),
Frost(String),
StorageErr(StorageError),
CryptoErr(CryptoError),
FrostErr(FrostError),
NetworkErr(NetworkError),
Serialization(Error),
Io(Error),
CapacityExceeded(String),
Other(String),
}Expand description
Keep operation errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidPassword
RateLimited(u64)
DecryptionFailed
KeyNotFound(String)
KeyAlreadyExists(String)
InvalidMnemonic(String)
InvalidNsec
InvalidNpub(String)
KeyringFull(usize)
Locked
AlreadyExists(String)
NotFound(String)
InvalidNetwork(String)
RotationFailed(String)
AuditWriteFailed(String)
Audit-log write failed for a security-critical event. Distinct from best-effort audit failures (those are only warn-logged): operations that return this variant performed their side effect (e.g. password / data-key rotation) but the audit entry could not be persisted, so the operation is observable only via this error.
Encryption(String)
Database(String)
VaultAlreadyOpen(String)
The vault’s redb file is already opened (exclusive lock) by another
process, typically a running keep serve daemon. Distinct from Database
so read-only CLI commands can detect it and route through the daemon’s
inspect socket instead of failing (#533). The payload is a
ready-to-display hint.
Migration(String)
HomeNotFound
PermissionDenied(String)
UserRejected
InvalidInput(String)
NotImplemented(String)
Runtime(String)
Config(String)
Frost(String)
StorageErr(StorageError)
CryptoErr(CryptoError)
FrostErr(FrostError)
NetworkErr(NetworkError)
Serialization(Error)
Io(Error)
CapacityExceeded(String)
Other(String)
Implementations§
Source§impl KeepError
impl KeepError
pub fn code(&self) -> Option<ErrorCode>
pub fn permission_denied(msg: impl Into<String>) -> Self
pub fn invalid_input(msg: impl Into<String>) -> Self
pub fn not_implemented(msg: impl Into<String>) -> Self
pub fn runtime(msg: impl Into<String>) -> Self
pub fn config(msg: impl Into<String>) -> Self
Trait Implementations§
Source§impl Error for KeepError
impl Error for KeepError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<CommitError> for KeepError
impl From<CommitError> for KeepError
Source§fn from(e: CommitError) -> Self
fn from(e: CommitError) -> Self
Converts to this type from the input type.
Source§impl From<CryptoError> for KeepError
impl From<CryptoError> for KeepError
Source§fn from(source: CryptoError) -> Self
fn from(source: CryptoError) -> Self
Converts to this type from the input type.
Source§impl From<DatabaseError> for KeepError
impl From<DatabaseError> for KeepError
Source§fn from(e: DatabaseError) -> Self
fn from(e: DatabaseError) -> Self
Converts to this type from the input type.
Source§impl From<EntropyHealthError> for KeepError
impl From<EntropyHealthError> for KeepError
Source§fn from(e: EntropyHealthError) -> Self
fn from(e: EntropyHealthError) -> Self
Converts to this type from the input type.
Source§impl From<FrostError> for KeepError
impl From<FrostError> for KeepError
Source§fn from(source: FrostError) -> Self
fn from(source: FrostError) -> Self
Converts to this type from the input type.
Source§impl From<NetworkError> for KeepError
impl From<NetworkError> for KeepError
Source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for KeepError
impl From<StorageError> for KeepError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for KeepError
impl From<StorageError> for KeepError
Source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Converts to this type from the input type.
Source§impl From<TableError> for KeepError
impl From<TableError> for KeepError
Source§fn from(e: TableError) -> Self
fn from(e: TableError) -> Self
Converts to this type from the input type.
Source§impl From<TransactionError> for KeepError
impl From<TransactionError> for KeepError
Source§fn from(e: TransactionError) -> Self
fn from(e: TransactionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for KeepError
impl !UnwindSafe for KeepError
impl Forget for KeepError
impl Freeze for KeepError
impl Move for KeepError
impl Send for KeepError
impl Sync for KeepError
impl Unpin for KeepError
impl UnsafeUnpin for KeepError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more