pub enum FsPathError {
Show 14 variants
Write {
source: Error,
path: PathBuf,
},
Read {
source: Error,
path: PathBuf,
},
ReadLink {
source: Error,
path: PathBuf,
},
CreateFile {
source: Error,
path: PathBuf,
},
RemoveFile {
source: Error,
path: PathBuf,
},
CreateDir {
source: Error,
path: PathBuf,
},
RemoveDir {
source: Error,
path: PathBuf,
},
ReadDir {
source: Error,
path: PathBuf,
},
Rename {
source: Error,
from: PathBuf,
to: PathBuf,
},
Open {
source: Error,
path: PathBuf,
},
ReadJson {
source: Error,
path: PathBuf,
},
WriteJson {
source: Error,
path: PathBuf,
},
Metadata {
source: Error,
path: PathBuf,
},
Fsync {
source: Error,
path: PathBuf,
},
}
Expand description
Various error variants for std::fs
operations that serve as an addition to the io::Error
which does not provide any information about the path.
Variants§
Write
Error variant for failed write operation with additional path context.
Read
Error variant for failed read operation with additional path context.
ReadLink
Error variant for failed read link operation with additional path context.
CreateFile
Error variant for failed file creation operation with additional path context.
RemoveFile
Error variant for failed file removal operation with additional path context.
CreateDir
Error variant for failed directory creation operation with additional path context.
RemoveDir
Error variant for failed directory removal operation with additional path context.
ReadDir
Error variant for failed directory read operation with additional path context.
Rename
Error variant for failed file renaming operation with additional path context.
Fields
Open
Error variant for failed file opening operation with additional path context.
ReadJson
Error variant for failed file read as JSON operation with additional path context.
WriteJson
Error variant for failed JSON write to file operation with additional path context.
Metadata
Error variant for failed file metadata operation with additional path context.
Fsync
Error variant for failed fsync operation with additional path context.
Implementations§
Source§impl FsPathError
impl FsPathError
Sourcepub fn write(source: Error, path: impl Into<PathBuf>) -> Self
pub fn write(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::write
.
Sourcepub fn read(source: Error, path: impl Into<PathBuf>) -> Self
pub fn read(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::read
.
Sourcepub fn read_link(source: Error, path: impl Into<PathBuf>) -> Self
pub fn read_link(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::read_link
.
Sourcepub fn create_file(source: Error, path: impl Into<PathBuf>) -> Self
pub fn create_file(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::File::create
.
Sourcepub fn remove_file(source: Error, path: impl Into<PathBuf>) -> Self
pub fn remove_file(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::remove_file
.
Sourcepub fn create_dir(source: Error, path: impl Into<PathBuf>) -> Self
pub fn create_dir(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::create_dir
.
Sourcepub fn remove_dir(source: Error, path: impl Into<PathBuf>) -> Self
pub fn remove_dir(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::remove_dir
.
Sourcepub fn read_dir(source: Error, path: impl Into<PathBuf>) -> Self
pub fn read_dir(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::read_dir
.
Sourcepub fn open(source: Error, path: impl Into<PathBuf>) -> Self
pub fn open(source: Error, path: impl Into<PathBuf>) -> Self
Returns the complementary error variant for std::fs::File::open
.
Sourcepub fn rename(
source: Error,
from: impl Into<PathBuf>,
to: impl Into<PathBuf>,
) -> Self
pub fn rename( source: Error, from: impl Into<PathBuf>, to: impl Into<PathBuf>, ) -> Self
Returns the complementary error variant for std::fs::rename
.
Trait Implementations§
Source§impl Debug for FsPathError
impl Debug for FsPathError
Source§impl Display for FsPathError
impl Display for FsPathError
Source§impl Error for FsPathError
impl Error for FsPathError
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 FsPathError
impl !RefUnwindSafe for FsPathError
impl Send for FsPathError
impl Sync for FsPathError
impl Unpin for FsPathError
impl !UnwindSafe for FsPathError
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
Write
: 40 bytesRead
: 40 bytesReadLink
: 40 bytesCreateFile
: 40 bytesRemoveFile
: 40 bytesCreateDir
: 40 bytesRemoveDir
: 40 bytesReadDir
: 40 bytesRename
: 56 bytesOpen
: 40 bytesReadJson
: 40 bytesWriteJson
: 40 bytesMetadata
: 40 bytesFsync
: 40 bytes