Enum BranchTarget
pub enum BranchTarget {
Label(MachLabel),
ResolvedOffset(i32),
}
Expand description
A branch target. Either unresolved (basic-block index) or resolved (offset from end of current instruction).
Variants§
Label(MachLabel)
An unresolved reference to a Label, as passed into
lower_branch_group()
.
ResolvedOffset(i32)
A fixed PC offset.
Implementations§
§impl BranchTarget
impl BranchTarget
pub fn as_offset14_or_zero(self) -> u32
pub fn as_offset14_or_zero(self) -> u32
Return the target’s offset, if specified, or zero if label-based.
pub fn as_offset19_or_zero(self) -> u32
pub fn as_offset19_or_zero(self) -> u32
Return the target’s offset, if specified, or zero if label-based.
pub fn as_offset26_or_zero(self) -> u32
pub fn as_offset26_or_zero(self) -> u32
Return the target’s offset, if specified, or zero if label-based.
Trait Implementations§
§impl Clone for BranchTarget
impl Clone for BranchTarget
§fn clone(&self) -> BranchTarget
fn clone(&self) -> BranchTarget
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 more§impl Debug for BranchTarget
impl Debug for BranchTarget
§impl PartialEq for BranchTarget
impl PartialEq for BranchTarget
impl Copy for BranchTarget
impl Eq for BranchTarget
impl StructuralPartialEq for BranchTarget
Auto Trait Implementations§
impl Freeze for BranchTarget
impl RefUnwindSafe for BranchTarget
impl Send for BranchTarget
impl Sync for BranchTarget
impl Unpin for BranchTarget
impl UnwindSafe for BranchTarget
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more