#[non_exhaustive]pub enum InPlaceErrorKind {
Canonicalize,
CurrentDir,
EmptyBackup,
GetMetadata,
Mktemp,
NoFilename,
NoParent,
Open,
SetMetadata,
PersistTemp,
SaveBackup,
Rmtemp,
}Expand description
An enumeration of the operations & checks that can fail while opening,
saving, or discarding an InPlaceFile.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Canonicalize
Returned by InPlace::open() if attempting to canonicalize the
edited path failed.
This error kind occurs when the edited path does not exist and
follow_symlinks is true.
CurrentDir
Returned by InPlace::open() if attempting to fetch the current
directory failed
EmptyBackup
Returned by InPlace::open() if the value within a Backup::Path,
Backup::FileName, or Backup::Append backup specifier was empty.
This error kind does not have a source error.
GetMetadata
Returned by InPlace::open() if attempting to fetch metadata &
permission details about the edited file failed.
This error kind occurs when the edited path does not exist and
follow_symlinks is false.
Mktemp
Returned by InPlace::open() if attempting to create the temporary
file failed
NoFilename
Returned by InPlace::open() if a Backup::Append specifier was
given and Path::file_name returned None for the edited path.
This error kind does not have a source error.
NoParent
Returned by InPlace::open() if Path::parent returned None for
the edited path (after canonicalization or absolutization).
This error kind does not have a source error.
Open
Returned by InPlace::open() if attempting to open the edited file
for reading failed
SetMetadata
Returned by InPlace::open() if attempting to copy the edited file’s
permissions to the temporary file failed
PersistTemp
Returned by InPlaceFile::save() if attempting to persist the
temporary file at the edited path failed
SaveBackup
Returned by InPlaceFile::save() if attempting to move the edited
file to the backup path failed
Rmtemp
Returned by InPlaceFile::discard() if attempting to delete the
temporary file failed
Trait Implementations§
Source§impl Clone for InPlaceErrorKind
impl Clone for InPlaceErrorKind
Source§fn clone(&self) -> InPlaceErrorKind
fn clone(&self) -> InPlaceErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more