[]Trait symbolic::debuginfo::dwarf::gimli::ReaderOffset

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

pub fn from_u8(offset: u8) -> Self

Convert a u8 to an offset.

pub fn from_u16(offset: u16) -> Self

Convert a u16 to an offset.

pub fn from_i16(offset: i16) -> Self

Convert an i16 to an offset.

pub fn from_u32(offset: u32) -> Self

Convert a u32 to an offset.

pub fn from_u64(offset: u64) -> Result<Self, Error>

Convert a u64 to an offset.

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

pub fn into_u64(self) -> u64

Convert an offset to a u64.

pub fn wrapping_add(self, other: Self) -> Self

Wrapping (modular) addition. Computes self + other.

pub fn checked_sub(self, other: Self) -> Option<Self>

Checked subtraction. Computes self - other.

Loading content...

Implementations on Foreign Types

impl ReaderOffset for u64

impl ReaderOffset for u32

impl ReaderOffset for usize

Loading content...

Implementors

Loading content...