InsnRead

Trait InsnRead 

Source
pub trait InsnRead: Read {
    // Required methods
    fn read_addr(&mut self, size: usize, rel: bool) -> Result<Address>;
    fn read_reloc(
        &mut self,
        size: usize,
        rel: bool,
        offset: Option<isize>,
    ) -> Result<Option<Address>>;
}

Required Methods§

Source

fn read_addr(&mut self, size: usize, rel: bool) -> Result<Address>

Source

fn read_reloc( &mut self, size: usize, rel: bool, offset: Option<isize>, ) -> Result<Option<Address>>

Reads a relocation If offset is None, reads from the head of the stream. Otherwise, reads from the given offset from the head.

If offset is not-None, the function may error if it is not between -size and size in bytes, rounded away from zero

Implementations on Foreign Types§

Source§

impl<R: InsnRead + ?Sized> InsnRead for &mut R

Source§

fn read_addr(&mut self, size: usize, rel: bool) -> Result<Address>

Source§

fn read_reloc( &mut self, size: usize, rel: bool, offset: Option<isize>, ) -> Result<Option<Address>>

Source§

impl<R: InsnRead + ?Sized> InsnRead for Box<R>

Source§

fn read_addr(&mut self, size: usize, rel: bool) -> Result<Address>

Source§

fn read_reloc( &mut self, size: usize, rel: bool, offset: Option<isize>, ) -> Result<Option<Address>>

Implementors§