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<UnitOffset<T>> for UnitOffset<T>
impl<T: PartialEq> PartialEq<UnitOffset<T>> for UnitOffset<T>
source§fn eq(&self, other: &UnitOffset<T>) -> bool
fn eq(&self, other: &UnitOffset<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd<UnitOffset<T>> for UnitOffset<T>
impl<T: PartialOrd> PartialOrd<UnitOffset<T>> for UnitOffset<T>
source§fn partial_cmp(&self, other: &UnitOffset<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &UnitOffset<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for UnitOffset<T>
impl<T: Eq> Eq for UnitOffset<T>
impl<T> StructuralEq for UnitOffset<T>
impl<T> StructuralPartialEq for UnitOffset<T>
Auto Trait Implementations§
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