pub enum DiffError {
Syntax(Error),
WrongShape(String),
DuplicatePath(String),
BeforeAnyFile,
EmptyPath,
Refused(String),
FileNotFound(String),
PathEscapes(String),
EmptySearch(String),
PatternNotFound {
path: String,
pattern: String,
},
PatternAmbiguous {
path: String,
pattern: String,
},
Io(String),
}Expand description
Errors raised while parsing or applying a C0DIFF.
Variants§
Syntax(Error)
The diff bytes are malformed.
WrongShape(String)
The heading declares a shape other than diff.
DuplicatePath(String)
The same path twice in one diff.
BeforeAnyFile
A record before the first FS.
EmptyPath
A file line with no path.
Refused(String)
Something a diff may not hold (DIFF.md): the reason.
FileNotFound(String)
A target file is missing.
PathEscapes(String)
A path that leaves the target directory.
EmptySearch(String)
A record whose search text is empty.
PatternNotFound
A record’s search text was not found after the cursor.
PatternAmbiguous
A record’s search text matched more than once.
Io(String)
An I/O failure while applying to disk.
Trait Implementations§
impl Eq for DiffError
Source§impl Error for DiffError
impl Error for DiffError
1.30.0 · 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()
impl StructuralPartialEq for DiffError
Auto Trait Implementations§
impl Forget for DiffError
impl Freeze for DiffError
impl Move for DiffError
impl RefUnwindSafe for DiffError
impl Send for DiffError
impl Sync for DiffError
impl Unpin for DiffError
impl UnsafeUnpin for DiffError
impl UnwindSafe for DiffError
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