#[non_exhaustive]pub enum DetoxError {
Io {
path: PathBuf,
source: Error,
},
Config {
path: PathBuf,
message: String,
},
Parse {
path: PathBuf,
line: usize,
column: usize,
message: String,
},
Collision {
path: PathBuf,
attempts: u32,
},
CrossDevice {
source_path: PathBuf,
target: PathBuf,
source_err: Error,
},
PathInvalid {
path: PathBuf,
reason: String,
},
}Expand description
Error type returned by Detox operations.
Pattern-matchable; carries structured payload (path + source-error where
applicable). The #[non_exhaustive] marker allows additive variants in
SemVer-minor releases.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io
Filesystem I/O failure for a specific path.
Fields
Config
Configuration file (detoxrc) could not be opened or was invalid.
Fields
Parse
detoxrc parse error with line + column.
Fields
Collision
Collision-resolution exhausted (more than collision_cap attempts).
Fields
CrossDevice
Cross-device rename (EXDEV) — the fallback chain also failed.
Fields
PathInvalid
Path was invalid for the active platform (e.g., contains characters not representable in the target OS filesystem).
Trait Implementations§
Source§impl Debug for DetoxError
impl Debug for DetoxError
Source§impl Display for DetoxError
impl Display for DetoxError
Source§impl Error for DetoxError
impl Error for DetoxError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DetoxError
impl !RefUnwindSafe for DetoxError
impl Send for DetoxError
impl Sync for DetoxError
impl Unpin for DetoxError
impl UnsafeUnpin for DetoxError
impl !UnwindSafe for DetoxError
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