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 more
sourceimpl<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>
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UnitOffset<T>) -> bool
fn ne(&self, other: &UnitOffset<T>) -> bool
This method tests for !=
.
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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
impl<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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more