Struct gimli::read::UnitOffset
source · pub struct UnitOffset<T = usize>(pub T);
Expand description
An offset into the current compilation or type unit.
Tuple Fields§
§0: T
Implementations§
source§impl<T: ReaderOffset> UnitOffset<T>
impl<T: ReaderOffset> UnitOffset<T>
sourcepub fn to_unit_section_offset<R>(&self, unit: &Unit<R>) -> UnitSectionOffset<T>where
R: Reader<Offset = T>,
pub fn to_unit_section_offset<R>(&self, unit: &Unit<R>) -> UnitSectionOffset<T>where
R: Reader<Offset = T>,
Convert an offset to be relative to the start of the .debug_info section, instead of relative to the start of the given compilation unit.
Does not check that the offset is valid.
source§impl<T: ReaderOffset> UnitOffset<T>
impl<T: ReaderOffset> UnitOffset<T>
sourcepub fn to_debug_info_offset<R>(
&self,
unit: &UnitHeader<R>,
) -> Option<DebugInfoOffset<T>>where
R: Reader<Offset = T>,
pub fn to_debug_info_offset<R>(
&self,
unit: &UnitHeader<R>,
) -> Option<DebugInfoOffset<T>>where
R: Reader<Offset = T>,
Convert an offset to be relative to the start of the .debug_info section, instead of relative to the start of the given unit. Returns None if the provided unit lives in the .debug_types section.
sourcepub fn to_debug_types_offset<R>(
&self,
unit: &UnitHeader<R>,
) -> Option<DebugTypesOffset<T>>where
R: Reader<Offset = T>,
pub fn to_debug_types_offset<R>(
&self,
unit: &UnitHeader<R>,
) -> Option<DebugTypesOffset<T>>where
R: Reader<Offset = T>,
Convert an offset to be relative to the start of the .debug_types section, instead of relative to the start of the given unit. Returns None if the provided unit lives in the .debug_info section.
Trait Implementations§
source§impl<T: Clone> Clone for UnitOffset<T>
impl<T: Clone> Clone for UnitOffset<T>
source§fn clone(&self) -> UnitOffset<T>
fn clone(&self) -> UnitOffset<T>
Returns a copy 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<T: Debug> Debug for UnitOffset<T>
impl<T: Debug> Debug for UnitOffset<T>
source§impl<T: Hash> Hash for UnitOffset<T>
impl<T: Hash> Hash for UnitOffset<T>
source§impl<T: Ord> Ord for UnitOffset<T>
impl<T: Ord> Ord for UnitOffset<T>
source§fn cmp(&self, other: &UnitOffset<T>) -> Ordering
fn cmp(&self, other: &UnitOffset<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq for UnitOffset<T>
impl<T: PartialEq> PartialEq for UnitOffset<T>
source§impl<T: PartialOrd> PartialOrd for UnitOffset<T>
impl<T: PartialOrd> PartialOrd for UnitOffset<T>
impl<T: Copy> Copy for UnitOffset<T>
impl<T: Eq> Eq for UnitOffset<T>
impl<T> StructuralPartialEq for UnitOffset<T>
Auto Trait Implementations§
impl<T> Freeze for UnitOffset<T>where
T: Freeze,
impl<T> RefUnwindSafe for UnitOffset<T>where
T: RefUnwindSafe,
impl<T> Send for UnitOffset<T>where
T: Send,
impl<T> Sync for UnitOffset<T>where
T: Sync,
impl<T> Unpin for UnitOffset<T>where
T: Unpin,
impl<T> UnwindSafe for UnitOffset<T>where
T: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.