pub enum RelocTarget {
ExternalName(ExternalName),
Label(LabelOrOffset),
}Expand description
A Relocation target
Variants§
ExternalName(ExternalName)
Points to an ExternalName outside the current function.
Label(LabelOrOffset)
Points to a MachLabel inside this function. This is different from an internal fixup/label reference in that both the relocation and the label will be emitted and are only resolved at link time.
There is no reason to prefer this over internal fixups unless the ABI requires it.
Implementations§
Source§impl RelocTarget
impl RelocTarget
Sourcepub fn display<'a>(&'a self, params: Option<&'a FunctionParameters>) -> String
pub fn display<'a>(&'a self, params: Option<&'a FunctionParameters>) -> String
Returns a display for the current RelocTarget, with extra context to prettify the output.
Trait Implementations§
Source§impl Clone for RelocTarget
impl Clone for RelocTarget
Source§fn clone(&self) -> RelocTarget
fn clone(&self) -> RelocTarget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelocTarget
impl Debug for RelocTarget
Source§impl<'de> Deserialize<'de> for RelocTarget
Available on crate feature enable-serde only.
impl<'de> Deserialize<'de> for RelocTarget
Available on crate feature
enable-serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RelocTarget
Source§impl From<ExternalName> for RelocTarget
impl From<ExternalName> for RelocTarget
Source§fn from(name: ExternalName) -> Self
fn from(name: ExternalName) -> Self
Converts to this type from the input type.
Source§impl From<MachLabel> for RelocTarget
impl From<MachLabel> for RelocTarget
Source§impl Hash for RelocTarget
impl Hash for RelocTarget
Source§impl PartialEq for RelocTarget
impl PartialEq for RelocTarget
Source§impl Serialize for RelocTarget
Available on crate feature enable-serde only.
impl Serialize for RelocTarget
Available on crate feature
enable-serde only.impl StructuralPartialEq for RelocTarget
Auto Trait Implementations§
impl Freeze for RelocTarget
impl RefUnwindSafe for RelocTarget
impl Send for RelocTarget
impl Sync for RelocTarget
impl Unpin for RelocTarget
impl UnsafeUnpin for RelocTarget
impl UnwindSafe for RelocTarget
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
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.