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
sourceimpl<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.
sourceimpl<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
sourceimpl<T: Clone> Clone for UnitOffset<T>
impl<T: Clone> Clone for UnitOffset<T>
sourcefn clone(&self) -> UnitOffset<T>
fn clone(&self) -> UnitOffset<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T: Debug> Debug for UnitOffset<T>
impl<T: Debug> Debug for UnitOffset<T>
sourceimpl<T: Hash> Hash for UnitOffset<T>
impl<T: Hash> Hash for UnitOffset<T>
sourceimpl<T: Ord> Ord for UnitOffset<T>
impl<T: Ord> Ord for UnitOffset<T>
sourcefn cmp(&self, other: &UnitOffset<T>) -> Ordering
fn cmp(&self, other: &UnitOffset<T>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq> PartialEq<UnitOffset<T>> for UnitOffset<T>
impl<T: PartialEq> PartialEq<UnitOffset<T>> for UnitOffset<T>
sourcefn eq(&self, other: &UnitOffset<T>) -> bool
fn eq(&self, other: &UnitOffset<T>) -> bool
sourceimpl<T: PartialOrd> PartialOrd<UnitOffset<T>> for UnitOffset<T>
impl<T: PartialOrd> PartialOrd<UnitOffset<T>> for UnitOffset<T>
sourcefn partial_cmp(&self, other: &UnitOffset<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &UnitOffset<T>) -> Option<Ordering>
1.0.0 · sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more