pub enum SafeError {
Show 18 variants
VaultNotFound {
path: String,
},
VaultAlreadyExists {
path: String,
},
SecretNotFound {
key: String,
},
SecretAlreadyExists {
key: String,
},
ProfileNotFound {
name: String,
},
DecryptionFailed,
Crypto {
context: String,
},
InvalidVault {
reason: String,
},
ImportParse {
file: String,
reason: String,
},
NoSnapshotAvailable {
profile: String,
},
SnapshotNotFound {
path: String,
},
MigrationFailed {
reason: String,
},
VaultCorrupted {
reason: String,
},
StaleBiometricCredential,
BiometricCanceled,
BiometricFailed(String),
Io(Error),
Serialization(Error),
}Expand description
Top-level error type for all tsafe-core operations.
Variants§
VaultNotFound
VaultAlreadyExists
SecretNotFound
SecretAlreadyExists
ProfileNotFound
DecryptionFailed
Crypto
InvalidVault
ImportParse
NoSnapshotAvailable
SnapshotNotFound
MigrationFailed
VaultCorrupted
StaleBiometricCredential
The OS credential store entry for biometric/keyring unlock is stale.
This occurs when the vault password was rotated, a new fingerprint enrolled,
or the biometric enrollment changed after tsafe biometric enable was run.
The stored credential no longer matches — the user must re-enroll explicitly.
Callers MUST NOT silently fall through to another method. Surface this
error with a clear message directing the user to tsafe biometric re-enroll.
BiometricCanceled
The Windows Hello verification dialog was dismissed by the user before completing. The vault unlock is not permitted; the caller must not fall through to another unlock method.
BiometricFailed(String)
A Windows Hello verification attempt failed for a reason other than user cancellation (device not ready, OS error, etc.).
Io(Error)
Serialization(Error)
Trait Implementations§
Source§impl Error for SafeError
impl Error for SafeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()