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§
sourcefn add_sized(self, length: u64, size: u8) -> Result<Self>
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.
sourcefn wrapping_add_sized(self, length: u64, size: u8) -> Self
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.
sourcefn ones_sized(size: u8) -> Self
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.