Struct binaryninja::references::CodeReference
source · pub struct CodeReference {
pub address: u64,
/* private fields */
}
Expand description
A struct representing a single code cross-reference.
Taking a cue from crate::linearview::LinearDisassemblyLine
, this struct uses ManuallyDrop to
prevent destructors from being run on the Function
object allocated by
the core in BNGetCodeReferences
(et al). The reference is cleaned up on Drop of
the enclosing array object.
Fields§
§address: u64
Implementations§
source§impl<'a> CodeReference
impl<'a> CodeReference
sourcepub fn function(&'a self) -> &'a Function
pub fn function(&'a self) -> &'a Function
A handle to the referenced function bound by the CodeReference object’s lifetime.
A user can call .to_owned()
to promote this into its own ref-counted struct
and use it after the lifetime of the CodeReference.
sourcepub fn architecture(&self) -> CoreArchitecture
pub fn architecture(&self) -> CoreArchitecture
A handle to the CodeReference’s CoreArchitecture. This type is Copy so reference shenanigans are not needed here.
Trait Implementations§
source§impl CoreArrayProvider for CodeReference
impl CoreArrayProvider for CodeReference
Auto Trait Implementations§
impl RefUnwindSafe for CodeReference
impl Send for CodeReference
impl Sync for CodeReference
impl Unpin for CodeReference
impl UnwindSafe for CodeReference
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