pub fn read_self(addr: usize, out: &mut [u8]) -> Result<(), ReadError>Expand description
Copies out.len() bytes beginning at addr in this process’s own
loaded image into out.
§Errors
Returns ReadError::NoMechanism on a target with no implementation,
ReadError::Os when the operating system refuses, and
ReadError::Short when fewer bytes arrive than were asked for.
An empty out is a successful no-op: the mechanisms below are not
specified for a zero-length request, and asking one for zero bytes
would make the outcome depend on a platform detail rather than on the
module’s state.