pub enum ReadError {
NoMechanism,
Os(i64),
Short {
wanted: usize,
got: usize,
},
}Expand description
Why a self-image read did not complete.
Variants§
NoMechanism
This target has no implemented mechanism.
Os(i64)
The operating system refused the read and reported this status.
mach_vm_read_overwrite’s kern_return_t on Darwin, the value
of GetLastError() on Windows. Carried rather than collapsed to
a boolean because “the address is not mapped” and “the process
lacks the right” are different findings for whoever is holding
a module that will not start.
Short
The mechanism succeeded but returned fewer bytes than asked for.
Distinguished from ReadError::Os because a short read with a
success status means the request straddled the end of a mapping,
which is a statement about the range table rather than about
permissions.
Trait Implementations§
Source§impl Error for ReadError
impl Error for ReadError
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()
Auto Trait Implementations§
impl Freeze for ReadError
impl RefUnwindSafe for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnsafeUnpin for ReadError
impl UnwindSafe 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