pub enum Error {
Io(Error),
Entropy(String),
Format(String),
KeyMismatch {
wanted: [u8; 8],
have: [u8; 8],
},
Crypto(String),
Config(String),
NoKey,
Usage(String),
}Expand description
Errors returned by library operations.
The variants line up with the exit codes the binary reports, so a caller can map an error to a code without inspecting its message.
Variants§
Io(Error)
Reading the input or writing the output failed.
Entropy(String)
The operating system refused to provide randomness.
Format(String)
The content is not a file this build can read.
KeyMismatch
The file belongs to a different repository key.
Crypto(String)
Authentication failed, or the cipher refused the input.
Config(String)
The repository is not in a state this command can act on.
NoKey
No repository key is present.
Usage(String)
The command line asked for something impossible.
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)>
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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