pub enum Error {
Show 34 variants
PathExistsError {
what: &'static str,
path: PathBuf,
},
PathNotFoundError {
what: &'static str,
path: PathBuf,
},
PathNotFileNotDir {
what: &'static str,
path: PathBuf,
},
PathWithParentDir {
what: &'static str,
path: PathBuf,
},
PathRenameError {
source: PathBuf,
target: PathBuf,
err: Error,
},
FileNotAFile {
path: PathBuf,
},
FileCreateError {
what: &'static str,
path: PathBuf,
err: Error,
},
FileOpenError {
what: &'static str,
path: PathBuf,
err: Error,
},
FileMetadataError {
path: PathBuf,
err: Error,
},
FilePermissionsError {
path: PathBuf,
err: Error,
},
FileWriteError {
what: &'static str,
path: PathBuf,
err: Error,
},
FileCopyError {
source: PathBuf,
target: PathBuf,
err: Error,
},
FileRemoveError {
path: PathBuf,
err: Error,
},
FileChecksumError {
what: &'static str,
path: PathBuf,
got: String,
expected: String,
},
FileLockError {
path: PathBuf,
err: Error,
},
DirNotFound {
path: PathBuf,
},
DirNotADir {
what: &'static str,
path: PathBuf,
},
DirCreateError {
what: &'static str,
path: PathBuf,
err: Error,
},
DirReadError {
what: &'static str,
path: PathBuf,
err: Error,
},
DirEntryReadError {
what: &'static str,
path: PathBuf,
entry: usize,
err: Error,
},
DirRemoveError {
path: PathBuf,
err: Error,
},
DirNotOneEntry {
what: &'static str,
path: PathBuf,
},
DirNonDirChild {
what: &'static str,
path: PathBuf,
child: OsString,
},
NotHttpsError {
address: String,
},
RequestError {
address: String,
err: Error,
},
RequestFailure {
address: String,
code: StatusCode,
err: Option<String>,
},
DownloadError {
address: String,
err: Error,
},
EncoderFlushError {
err: Error,
},
TarAppendError {
source: PathBuf,
tarball: PathBuf,
err: Error,
},
TarFinishError {
path: PathBuf,
err: Error,
},
TarEntriesError {
path: PathBuf,
err: Error,
},
TarEntryError {
path: PathBuf,
entry: usize,
err: Error,
},
TarEntryPathError {
path: PathBuf,
entry: usize,
err: Error,
},
TarExtractError {
tarball: PathBuf,
entry: PathBuf,
target: PathBuf,
err: Error,
},
}
Expand description
Defines the errors tha may occur when dealing with the filesystem operations.
Variants§
PathExistsError
The given path already exists.
PathNotFoundError
File not found.
PathNotFileNotDir
File not a file or a directory.
PathWithParentDir
The given path contains a ‘..’ where it is not allowed.
PathRenameError
Failed to rename the given path to the target path.
FileNotAFile
The given file is not a file.
FileCreateError
Failed to create a file.
FileOpenError
Failed to open an existing file.
FileMetadataError
Failed to read metadata of the given file.
FilePermissionsError
Failed to update the permissions of the given file.
FileWriteError
Failed to write to the output file.
FileCopyError
Failed to copy a file.
FileRemoveError
Failed to remove a file.
FileChecksumError
The checksum of a file was not what we expected.
FileLockError
Failed to lock a file.
DirNotFound
Directory not found.
DirNotADir
The given directory should be a directory, but isn’t.
DirCreateError
Failed to create some directory.
DirReadError
Failed to read a directory’s entries.
DirEntryReadError
Failed to read a single entry within the directory’s entries.
DirRemoveError
Failed to remove a directory.
DirNotOneEntry
A given dir had not exactly one child.
DirNonDirChild
A given dir had not a directory as child.
NotHttpsError
The given address did not have HTTPS enabled.
RequestError
Failed to send a request to the given address.
RequestFailure
The given server responded with a non-2xx status code.
DownloadError
Failed to download the full file stream.
EncoderFlushError
A bit of an obscure error meaning we failed to flush the encoder (=write handle)’s contents.
TarAppendError
Failed to append a file to the given archive.
TarFinishError
Failed to finish writing the given tarball.
TarEntriesError
Failed to read the entries in a tarball.
TarEntryError
Failed a particular entry in the tarball.
TarEntryPathError
Failed to get the path in the given entry.
TarExtractError
Failed to extract the given tarball.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · 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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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
source§impl<T> ErrorTrace for Twhere
T: Error,
impl<T> ErrorTrace for Twhere
T: Error,
source§fn trace(&self) -> ErrorTraceFormatter<'_>
fn trace(&self) -> ErrorTraceFormatter<'_>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request