pub struct UnitSectionOffset<T = usize>(pub T);Expand description
An offset into the .debug_info or .debug_types sections.
This type does not store which section the offset applies to. You will need to either
determine that from the context of its use, or store a SectionId along with it.
Tuple Fields§
§0: TImplementations§
Source§impl<T: ReaderOffset> UnitSectionOffset<T>
impl<T: ReaderOffset> UnitSectionOffset<T>
Sourcepub fn to_unit_offset<R>(&self, unit: &UnitHeader<R>) -> Option<UnitOffset<T>>where
R: Reader<Offset = T>,
pub fn to_unit_offset<R>(&self, unit: &UnitHeader<R>) -> Option<UnitOffset<T>>where
R: Reader<Offset = T>,
Convert an offset to be relative to the start of the given unit, instead of relative to the start of the section.
Returns None if the offset is not in bounds for the unit’s entries.
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 section for the given unit.
Returns None if the unit is not within the .debug_info 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 section for the given unit.
Returns None if the unit is not within the .debug_types section.
Trait Implementations§
Source§impl<T: Clone> Clone for UnitSectionOffset<T>
impl<T: Clone> Clone for UnitSectionOffset<T>
Source§fn clone(&self) -> UnitSectionOffset<T>
fn clone(&self) -> UnitSectionOffset<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Debug> Debug for UnitSectionOffset<T>
impl<T: Debug> Debug for UnitSectionOffset<T>
Source§impl<T: Hash> Hash for UnitSectionOffset<T>
impl<T: Hash> Hash for UnitSectionOffset<T>
Source§impl<T: Ord> Ord for UnitSectionOffset<T>
impl<T: Ord> Ord for UnitSectionOffset<T>
Source§fn cmp(&self, other: &UnitSectionOffset<T>) -> Ordering
fn cmp(&self, other: &UnitSectionOffset<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<T: PartialEq> PartialEq for UnitSectionOffset<T>
impl<T: PartialEq> PartialEq for UnitSectionOffset<T>
Source§impl<T: PartialOrd> PartialOrd for UnitSectionOffset<T>
impl<T: PartialOrd> PartialOrd for UnitSectionOffset<T>
impl<T: Copy> Copy for UnitSectionOffset<T>
impl<T: Eq> Eq for UnitSectionOffset<T>
impl<T> StructuralPartialEq for UnitSectionOffset<T>
Auto Trait Implementations§
impl<T> Freeze for UnitSectionOffset<T>where
T: Freeze,
impl<T> RefUnwindSafe for UnitSectionOffset<T>where
T: RefUnwindSafe,
impl<T> Send for UnitSectionOffset<T>where
T: Send,
impl<T> Sync for UnitSectionOffset<T>where
T: Sync,
impl<T> Unpin for UnitSectionOffset<T>where
T: Unpin,
impl<T> UnsafeUnpin for UnitSectionOffset<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for UnitSectionOffset<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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
key and return true if they are equal.