#[non_exhaustive]pub enum Error {
Show 13 variants
Invalid {
code: &'static str,
message: String,
},
Auth {
code: String,
message: String,
},
Forbidden {
message: String,
},
NotFound {
message: String,
},
VaultNotFound {
label: String,
message: String,
},
UnknownPath {
path: String,
suggestion: Option<String>,
project_known: bool,
message: String,
},
Conflict {
name: String,
expected: Expected,
current: Option<u64>,
message: String,
},
StaleGeneration {
label: String,
message: String,
},
Integrity {
failure: IntegrityFailure,
message: String,
},
Server {
code: String,
status: u16,
message: String,
},
Transport {
server: String,
message: String,
source: Arc<dyn Error + Send + Sync>,
},
Store {
message: String,
source: Arc<StoreError>,
},
Other {
message: String,
},
}Expand description
Every failure this crate returns. Send, Sync and Clone.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Invalid
Refused on this side before any request: a bad argument, file,
environment, document or local state. code says which.
Auth
The token is malformed, unknown, revoked or expired, or its vault
expired (unauthorized, token_expired, invalid_token).
Forbidden
The credential’s scope or allow-list does not permit it.
NotFound
No such record, version or token, or the record was deleted.
VaultNotFound
The server does not know an owner’s vault: it expired, was deleted, or was re-rooted. An expired one can be repaired at the same id.
UnknownPath
A path that is not in the known tree, refused before any request.
Fields
Conflict
Another writer won; nothing was overwritten.
Fields
StaleGeneration
The vault was rotated underneath this handle: call
crate::Vault::refresh and retry.
Integrity
Something the server served does not verify.
Server
Any other refusal by the server, its code kept verbatim, including a
code this client does not know (http_<status> when it named none).
Transport
The server could not be reached; source() is the I/O or TLS error.
Fields
Store
A key store or state store failed; source() is its error.
Other
Any other failure (code error).
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()