Trait gimli::read::reader::ReaderAddress

source ·
pub(crate) trait ReaderAddress: Sized {
    // Required methods
    fn add_sized(self, length: u64, size: u8) -> Result<Self>;
    fn wrapping_add_sized(self, length: u64, size: u8) -> Self;
    fn ones_sized(size: u8) -> Self;
}
Expand description

A trait for addresses within a DWARF section.

Currently this is a simple extension trait for u64, but it may be expanded in the future to support user-defined address types.

Required Methods§

source

fn add_sized(self, length: u64, size: u8) -> Result<Self>

Add a length to an address of the given size.

Returns an error for overflow.

source

fn wrapping_add_sized(self, length: u64, size: u8) -> Self

Add a length to an address of the given size.

Wraps the result to the size of the address to allow for the possibility that the length is a negative value.

source

fn ones_sized(size: u8) -> Self

The all-ones value of an address of the given size.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ReaderAddress for u64

source§

fn add_sized(self, length: u64, size: u8) -> Result<Self>

source§

fn wrapping_add_sized(self, length: u64, size: u8) -> Self

source§

fn ones_sized(size: u8) -> Self

Implementors§