pub struct SimpleRelocation(/* private fields */);Expand description
A simple relocation type for relocations that do not need complex bitpacking.
Trait Implementations§
Source§impl Clone for SimpleRelocation
impl Clone for SimpleRelocation
Source§fn clone(&self) -> SimpleRelocation
fn clone(&self) -> SimpleRelocation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimpleRelocation
impl Debug for SimpleRelocation
Source§impl Relocation for SimpleRelocation
A relocation that has no architecture-specific encoding/decoding logic
impl Relocation for SimpleRelocation
A relocation that has no architecture-specific encoding/decoding logic
Source§fn from_encoding(encoding: u8) -> Self
fn from_encoding(encoding: u8) -> Self
construct this relocation from an encoded representation.
Source§fn from_size(kind: RelocationKind, size: RelocationSize) -> Self
fn from_size(kind: RelocationKind, size: RelocationSize) -> Self
construct this relocation from a simple size. This is used to implement relocations in directives and literal pools.
Source§fn write_value(
&self,
buf: &mut [u8],
value: isize,
) -> Result<(), ImpossibleRelocation>
fn write_value( &self, buf: &mut [u8], value: isize, ) -> Result<(), ImpossibleRelocation>
Write a value into a buffer of size
self.size() in the format of this relocation.
Any bits not part of the relocation should be preserved.Source§fn read_value(&self, buf: &[u8]) -> isize
fn read_value(&self, buf: &[u8]) -> isize
Read a value from a buffer of size
self.size() in the format of this relocation.Source§fn kind(&self) -> RelocationKind
fn kind(&self) -> RelocationKind
Specifies what kind of relocation this relocation instance is.
impl Copy for SimpleRelocation
Auto Trait Implementations§
impl Freeze for SimpleRelocation
impl RefUnwindSafe for SimpleRelocation
impl Send for SimpleRelocation
impl Sync for SimpleRelocation
impl Unpin for SimpleRelocation
impl UnwindSafe for SimpleRelocation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more