Expand description
Error context wrapper for sys_traits operations.
This module provides SysWithPathsInErrors, a wrapper that adds operation and path
context to errors returned by sys_traits methods.
§Example
use sys_traits::PathsInErrorsExt;
use sys_traits::impls::RealSys;
let sys = RealSys;
// Without context:
// sys.fs_read("/path/to/file")?;
// Error: No such file or directory (os error 2)
// With context:
sys.with_paths_in_errors().fs_read("/path/to/file")?;
// Error: failed to read '/path/to/file': No such file or directory (os error 2)Structs§
- FsFile
With Paths InErrors - A file wrapper that includes the path in error messages.
- Operation
Error - An error that includes context about the operation that failed.
- SysWith
Paths InErrors - A wrapper that adds error context to sys_traits operations.
Enums§
- Operation
Error Kind - The kind of context associated with an operation error.
Traits§
- Paths
InErrors Ext - Extension trait that provides the
with_paths_in_errorsmethod.