pub enum Error {
Io(Error),
NotRegularFile,
FileTooLarge,
EmptyFilesCannotDiffer,
EmptyLinesCannotDiffer,
InvalidLineNumber,
InvalidBytePosition,
SearchAlreadyComplete,
}Expand description
An error returned by a core operation.
Variants§
Io(Error)
Metadata lookup, opening, or reading the file failed.
NotRegularFile
The path does not identify a regular file.
FileTooLarge
A byte count, line count, or character position cannot fit in u64.
EmptyFilesCannotDiffer
Both supplied line counts are zero despite a reported mismatch.
EmptyLinesCannotDiffer
Both supplied line byte lengths are zero despite a reported mismatch.
InvalidLineNumber
A line-local operation was given line zero; its lines start at 1.
InvalidBytePosition
The byte position is zero or more than one past the selected line.
An absent line permits only byte position 1.
SearchAlreadyComplete
An answer was submitted after the search had reached its result.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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 !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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