pub enum Error {
Show 25 variants
RepoPathNotAbsolute(PathBuf),
RepoNotFound(PathBuf),
NotADirectory(PathBuf),
PathNotExist(PathBuf),
PathNotRelative(PathBuf),
EmptyKey,
EmptyPassword,
NoFile(&'static str),
InvalidMagic,
UnsupportedVersion(u8),
UnsupportedAlgo(u8),
CorruptHeader(PathBuf),
EncryptFailed(String),
DecryptFailed(String),
Argon2(String),
TruncatedChunk,
FileTruncated,
AtomicPersist(PathBuf, String),
Git(String),
HookExists(PathBuf),
FilesNotEncrypted(usize, usize),
Config(String),
Io(Error),
SaltCache(String),
Other(String),
}Expand description
The error type returned by all public library functions.
Variants§
RepoPathNotAbsolute(PathBuf)
repo argument was not an absolute path (lib callers must absolutize).
RepoNotFound(PathBuf)
Repository directory does not exist.
NotADirectory(PathBuf)
Repository path is not a directory.
PathNotExist(PathBuf)
Path supplied for the crypt list does not exist on disk.
PathNotRelative(PathBuf)
Expected a repo-relative path but got an absolute one.
EmptyKey
Master key/password is empty.
EmptyPassword
User entered an empty password interactively.
NoFile(&'static str)
Operation had no target files to act on.
InvalidMagic
File does not start with the GITSE magic / supported version.
UnsupportedVersion(u8)
Header advertises an unsupported format version.
UnsupportedAlgo(u8)
Header advertises an unsupported encryption algorithm.
CorruptHeader(PathBuf)
Header could not be parsed / validated.
EncryptFailed(String)
XChaCha20-Poly1305 encryption failure.
DecryptFailed(String)
XChaCha20-Poly1305 decryption failure (wrong password, corrupt or tampered data are all reported identically by AEAD).
Argon2(String)
Argon2 key derivation failure.
TruncatedChunk
Encrypted chunk is missing its ciphertext.
FileTruncated
Encrypted file ended without a final chunk.
AtomicPersist(PathBuf, String)
Atomic temp-file persist failed.
Git(String)
Underlying git invocation failed.
HookExists(PathBuf)
A pre-commit hook already exists at the target path.
FilesNotEncrypted(usize, usize)
check found unencrypted files. The count is (unencrypted, total).
Config(String)
Config file parse/serialize error.
Io(Error)
Generic I/O error.
SaltCache(String)
Rkyv (de)serialization failure for the salt cache.
Other(String)
Anything else — an opaque error message.
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()
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.