pub struct SysWithPathsInErrors<'a, T: ?Sized>(pub &'a T);Expand description
A wrapper that adds error context to sys_traits operations.
Use PathsInErrorsExt::with_paths_in_errors to create an instance.
Tuple Fields§
§0: &'a TImplementations§
Source§impl<'a, T: ?Sized> SysWithPathsInErrors<'a, T>
impl<'a, T: ?Sized> SysWithPathsInErrors<'a, T>
Source§impl<T: BaseFsCanonicalize> SysWithPathsInErrors<'_, T>
impl<T: BaseFsCanonicalize> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsChown> SysWithPathsInErrors<'_, T>
impl<T: BaseFsChown> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsSymlinkChown> SysWithPathsInErrors<'_, T>
impl<T: BaseFsSymlinkChown> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsCloneFile> SysWithPathsInErrors<'_, T>
impl<T: BaseFsCloneFile> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsCopy> SysWithPathsInErrors<'_, T>
impl<T: BaseFsCopy> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsCreateDir> SysWithPathsInErrors<'_, T>
impl<T: BaseFsCreateDir> SysWithPathsInErrors<'_, T>
pub fn fs_create_dir( &self, path: impl AsRef<Path>, options: &CreateDirOptions, ) -> Result<()>
pub fn fs_create_dir_all(&self, path: impl AsRef<Path>) -> Result<()>
Source§impl<T: BaseFsHardLink> SysWithPathsInErrors<'_, T>
impl<T: BaseFsHardLink> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsCreateJunction> SysWithPathsInErrors<'_, T>
impl<T: BaseFsCreateJunction> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsMetadata> SysWithPathsInErrors<'_, T>
impl<T: BaseFsMetadata> SysWithPathsInErrors<'_, T>
pub fn fs_metadata(&self, path: impl AsRef<Path>) -> Result<T::Metadata>
pub fn fs_symlink_metadata(&self, path: impl AsRef<Path>) -> Result<T::Metadata>
pub fn fs_is_file(&self, path: impl AsRef<Path>) -> Result<bool>
pub fn fs_is_dir(&self, path: impl AsRef<Path>) -> Result<bool>
pub fn fs_is_symlink(&self, path: impl AsRef<Path>) -> Result<bool>
pub fn fs_exists(&self, path: impl AsRef<Path>) -> Result<bool>
pub fn fs_exists_no_err(&self, path: impl AsRef<Path>) -> bool
pub fn fs_is_file_no_err(&self, path: impl AsRef<Path>) -> bool
pub fn fs_is_dir_no_err(&self, path: impl AsRef<Path>) -> bool
pub fn fs_is_symlink_no_err(&self, path: impl AsRef<Path>) -> bool
Source§impl<T: BaseFsOpen> SysWithPathsInErrors<'_, T>
impl<T: BaseFsOpen> SysWithPathsInErrors<'_, T>
pub fn fs_open( &self, path: impl AsRef<Path>, options: &OpenOptions, ) -> Result<FsFileWithPathsInErrors<T::File>>
Source§impl<T: FsOpenBoxed + ?Sized> SysWithPathsInErrors<'_, T>
impl<T: FsOpenBoxed + ?Sized> SysWithPathsInErrors<'_, T>
pub fn fs_open_boxed( &self, path: impl AsRef<Path>, options: &OpenOptions, ) -> Result<FsFileWithPathsInErrors<BoxedFsFile>>
Source§impl<T: BaseFsRead> SysWithPathsInErrors<'_, T>
impl<T: BaseFsRead> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsReadDir> SysWithPathsInErrors<'_, T>
impl<T: BaseFsReadDir> SysWithPathsInErrors<'_, T>
pub fn fs_read_dir( &self, path: impl AsRef<Path>, ) -> Result<Box<dyn Iterator<Item = Result<T::ReadDirEntry>>>>
Source§impl<T: BaseFsReadLink> SysWithPathsInErrors<'_, T>
impl<T: BaseFsReadLink> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsRemoveDir> SysWithPathsInErrors<'_, T>
impl<T: BaseFsRemoveDir> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsRemoveDirAll> SysWithPathsInErrors<'_, T>
impl<T: BaseFsRemoveDirAll> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsRemoveFile> SysWithPathsInErrors<'_, T>
impl<T: BaseFsRemoveFile> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsRename> SysWithPathsInErrors<'_, T>
impl<T: BaseFsRename> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsSetFileTimes> SysWithPathsInErrors<'_, T>
impl<T: BaseFsSetFileTimes> SysWithPathsInErrors<'_, T>
pub fn fs_set_file_times( &self, path: impl AsRef<Path>, atime: SystemTime, mtime: SystemTime, ) -> Result<()>
Source§impl<T: BaseFsSetSymlinkFileTimes> SysWithPathsInErrors<'_, T>
impl<T: BaseFsSetSymlinkFileTimes> SysWithPathsInErrors<'_, T>
pub fn fs_set_symlink_file_times( &self, path: impl AsRef<Path>, atime: SystemTime, mtime: SystemTime, ) -> Result<()>
Source§impl<T: BaseFsSetPermissions> SysWithPathsInErrors<'_, T>
impl<T: BaseFsSetPermissions> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsSymlinkDir> SysWithPathsInErrors<'_, T>
impl<T: BaseFsSymlinkDir> SysWithPathsInErrors<'_, T>
Source§impl<T: BaseFsSymlinkFile> SysWithPathsInErrors<'_, T>
impl<T: BaseFsSymlinkFile> SysWithPathsInErrors<'_, T>
Trait Implementations§
Source§impl<T: ?Sized> Clone for SysWithPathsInErrors<'_, T>
impl<T: ?Sized> Clone for SysWithPathsInErrors<'_, T>
impl<T: ?Sized> Copy for SysWithPathsInErrors<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for SysWithPathsInErrors<'a, T>where
T: ?Sized,
impl<'a, T> RefUnwindSafe for SysWithPathsInErrors<'a, T>where
T: RefUnwindSafe + ?Sized,
impl<'a, T> Send for SysWithPathsInErrors<'a, T>
impl<'a, T> Sync for SysWithPathsInErrors<'a, T>
impl<'a, T> Unpin for SysWithPathsInErrors<'a, T>where
T: ?Sized,
impl<'a, T> UnsafeUnpin for SysWithPathsInErrors<'a, T>where
T: ?Sized,
impl<'a, T> UnwindSafe for SysWithPathsInErrors<'a, T>where
T: RefUnwindSafe + ?Sized,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> PathsInErrorsExt for Twhere
T: ?Sized,
impl<T> PathsInErrorsExt for Twhere
T: ?Sized,
Source§fn with_paths_in_errors(&self) -> SysWithPathsInErrors<'_, Self>
fn with_paths_in_errors(&self) -> SysWithPathsInErrors<'_, Self>
Wraps
self in a SysWithPathsInErrors that includes paths in error messages.