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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.