pub struct LabelOrOffset(/* private fields */);Expand description
A MachLabel or CodeOffset, bitpacked into a u32.
This type is used to represent a label reference in some
MachBuffer metadata (specifically, relocations and
exception-handler records). These start as labels before the
MachBuffer is finalized; once finish() is called, they become
code offsets.
Implementations§
Source§impl LabelOrOffset
impl LabelOrOffset
Sourcepub fn offset(offset: CodeOffset) -> Self
pub fn offset(offset: CodeOffset) -> Self
Create a LabelOrOffset that refers to a code offset.
Sourcepub fn as_offset(&self) -> CodeOffset
pub fn as_offset(&self) -> CodeOffset
Trait Implementations§
Source§impl Clone for LabelOrOffset
impl Clone for LabelOrOffset
impl Copy for LabelOrOffset
Source§impl Debug for LabelOrOffset
impl Debug for LabelOrOffset
Source§impl Display for LabelOrOffset
impl Display for LabelOrOffset
impl Eq for LabelOrOffset
Source§impl From<MachLabel> for LabelOrOffset
impl From<MachLabel> for LabelOrOffset
Source§impl Hash for LabelOrOffset
impl Hash for LabelOrOffset
Source§impl PartialEq for LabelOrOffset
impl PartialEq for LabelOrOffset
impl StructuralPartialEq for LabelOrOffset
Auto Trait Implementations§
impl Freeze for LabelOrOffset
impl RefUnwindSafe for LabelOrOffset
impl Send for LabelOrOffset
impl Sync for LabelOrOffset
impl Unpin for LabelOrOffset
impl UnsafeUnpin for LabelOrOffset
impl UnwindSafe for LabelOrOffset
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.