Trait gimli::read::ReaderOffset[][src]

pub trait ReaderOffset: Debug + Copy + Eq + Ord + Hash + Add<Output = Self> + AddAssign + Sub<Output = Self> {
    fn from_u8(offset: u8) -> Self;
fn from_u16(offset: u16) -> Self;
fn from_i16(offset: i16) -> Self;
fn from_u32(offset: u32) -> Self;
fn from_u64(offset: u64) -> Result<Self>;
fn into_u64(self) -> u64;
fn wrapping_add(self, other: Self) -> Self;
fn checked_sub(self, other: Self) -> Option<Self>; }

A trait for offsets with a DWARF section.

This allows consumers to choose a size that is appropriate for their address space.

Required methods

fn from_u8(offset: u8) -> Self[src]

Convert a u8 to an offset.

fn from_u16(offset: u16) -> Self[src]

Convert a u16 to an offset.

fn from_i16(offset: i16) -> Self[src]

Convert an i16 to an offset.

fn from_u32(offset: u32) -> Self[src]

Convert a u32 to an offset.

fn from_u64(offset: u64) -> Result<Self>[src]

Convert a u64 to an offset.

Returns Error::UnsupportedOffset if the value is too large.

fn into_u64(self) -> u64[src]

Convert an offset to a u64.

fn wrapping_add(self, other: Self) -> Self[src]

Wrapping (modular) addition. Computes self + other.

fn checked_sub(self, other: Self) -> Option<Self>[src]

Checked subtraction. Computes self - other.

Loading content...

Implementors

impl ReaderOffset for u32[src]

impl ReaderOffset for u64[src]

impl ReaderOffset for usize[src]

Loading content...