Struct UnitOffset

struct UnitOffset<T = usize>(8617)

An offset into the current compilation or type unit.

Implementations

impl<T: ReaderOffset> UnitOffset<T>

fn to_unit_section_offset<R>(self: &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.

impl<T: ReaderOffset> UnitOffset<T>

fn to_debug_info_offset<R>(self: &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.

fn to_debug_types_offset<R>(self: &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.

impl<T> Any for UnitOffset<T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for UnitOffset<T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for UnitOffset<T>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for UnitOffset<T>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> Freeze for UnitOffset<T>

impl<T> From for UnitOffset<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> RefUnwindSafe for UnitOffset<T>

impl<T> Send for UnitOffset<T>

impl<T> StructuralPartialEq for UnitOffset<T>

impl<T> Sync for UnitOffset<T>

impl<T> ToOwned for UnitOffset<T>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> Unpin for UnitOffset<T>

impl<T> UnsafeUnpin for UnitOffset<T>

impl<T> UnwindSafe for UnitOffset<T>

impl<T, U> Into for UnitOffset<T>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for UnitOffset<T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for UnitOffset<T>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T: $crate::clone::Clone> Clone for UnitOffset<T>

fn clone(self: &Self) -> UnitOffset<T>

impl<T: $crate::cmp::Eq> Eq for UnitOffset<T>

impl<T: $crate::cmp::Ord> Ord for UnitOffset<T>

fn cmp(self: &Self, other: &UnitOffset<T>) -> Ordering

impl<T: $crate::cmp::PartialEq> PartialEq for UnitOffset<T>

fn eq(self: &Self, other: &UnitOffset<T>) -> bool

impl<T: $crate::cmp::PartialOrd> PartialOrd for UnitOffset<T>

fn partial_cmp(self: &Self, other: &UnitOffset<T>) -> Option<Ordering>

impl<T: $crate::fmt::Debug> Debug for UnitOffset<T>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<T: $crate::hash::Hash> Hash for UnitOffset<T>

fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)

impl<T: $crate::marker::Copy> Copy for UnitOffset<T>