pub trait Relr:
Debug
+ Pod
+ Clone {
type Word: Into<u64>;
type Endian: Endian;
const COUNT: u8;
// Required methods
fn get(&self, endian: Self::Endian) -> Self::Word;
fn next(
offset: &mut Self::Word,
bits: &mut Self::Word,
) -> Option<Self::Word>;
}
Expand description
A trait for generic access to elf::Relr32
and elf::Relr64
.
Required Associated Constants§
Required Associated Types§
Required Methods§
sourcefn get(&self, endian: Self::Endian) -> Self::Word
fn get(&self, endian: Self::Endian) -> Self::Word
Get the relocation entry.
This value is an offset if the lowest bit is clear, or a bit mask if the lowest bit is set.
sourcefn next(offset: &mut Self::Word, bits: &mut Self::Word) -> Option<Self::Word>
fn next(offset: &mut Self::Word, bits: &mut Self::Word) -> Option<Self::Word>
Return the offset corresponding to the next bit in the bit mask.
Updates the offset and bit mask. This method should be called 31 times for Relr32 and 63 times for Relr64 to iterate over all the bits.
Returns None
if the bit is not set.
Object Safety§
This trait is not object safe.