pub enum ReadError {
RepositoryRoot {
source: Error,
},
ResolvePath {
path: String,
source: Error,
},
OutsideRepository {
path: String,
},
Open {
path: String,
source: Error,
},
Read {
path: String,
source: Error,
},
OffsetBeyondEnd {
offset: u64,
path: String,
},
LineTooLong {
line: u64,
path: String,
},
InvalidUtf8 {
line: u64,
path: String,
},
ScanLimitExceeded {
limit: usize,
path: String,
},
Encode(Error),
}Expand description
Failure while safely executing one repository-relative read.
Variants§
RepositoryRoot
The repository root could not be resolved.
ResolvePath
The requested path could not be resolved.
OutsideRepository
The canonical requested path escapes the canonical repository root.
Open
The requested file could not be opened.
Read
The requested file could not be read.
OffsetBeyondEnd
The requested line does not exist.
LineTooLong
A line cannot fit in the bounded tool result.
Fields
InvalidUtf8
File content is not valid UTF-8 text.
ScanLimitExceeded
The read consumed its bounded file-scan allowance.
Fields
Encode(Error)
The successful result could not be encoded for the model.
Trait Implementations§
Source§impl Error for ReadError
impl Error for ReadError
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 !RefUnwindSafe for ReadError
impl !UnwindSafe for ReadError
impl Freeze for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnsafeUnpin for ReadError
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