summaryrefslogtreecommitdiff
path: root/rust/src/function.rs
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-11-23 17:58:37 -0500
committerMason Reed <mason@vector35.com>2025-11-23 18:18:08 -0500
commitcd6747223935581ae422a9825a389d89f329b5fd (patch)
tree02ad7e5afc5a97f97670deb0dac9b047a1b351d7 /rust/src/function.rs
parent979ba310a3489eddb5403fcdcf596e8fca4e1569 (diff)
[Rust] Clarify and expand on the current set of queryable offset properties
Now that we have more duplicate API's we need to clarify and cross link between them to help alleviate the confusion for readers.
Diffstat (limited to 'rust/src/function.rs')
-rw-r--r--rust/src/function.rs42
1 files changed, 1 insertions, 41 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs
index c0e00bd1..80de8e6d 100644
--- a/rust/src/function.rs
+++ b/rust/src/function.rs
@@ -38,6 +38,7 @@ pub use binaryninjacore_sys::BNFunctionUpdateType as FunctionUpdateType;
pub use binaryninjacore_sys::BNHighlightStandardColor as HighlightStandardColor;
use crate::architecture::RegisterId;
+use crate::binary_view::AddressRange;
use crate::confidence::Conf;
use crate::high_level_il::HighLevelILFunction;
use crate::language_representation::CoreLanguageRepresentationFunction;
@@ -373,7 +374,6 @@ impl Function {
unsafe {
let mut count = 0;
let addresses = BNGetFunctionAddressRanges(self.handle, &mut count);
-
Array::new(addresses, count, ())
}
}
@@ -2684,46 +2684,6 @@ impl PartialEq for Function {
}
}
-#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
-pub struct AddressRange {
- pub start: u64,
- pub end: u64,
-}
-
-impl From<BNAddressRange> for AddressRange {
- fn from(raw: BNAddressRange) -> Self {
- Self {
- start: raw.start,
- end: raw.end,
- }
- }
-}
-
-impl From<AddressRange> for BNAddressRange {
- fn from(raw: AddressRange) -> Self {
- Self {
- start: raw.start,
- end: raw.end,
- }
- }
-}
-
-impl CoreArrayProvider for AddressRange {
- type Raw = BNAddressRange;
- type Context = ();
- type Wrapped<'a> = Self;
-}
-
-unsafe impl CoreArrayProviderInner for AddressRange {
- unsafe fn free(raw: *mut Self::Raw, _count: usize, _context: &Self::Context) {
- BNFreeAddressRanges(raw);
- }
-
- unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> {
- Self::from(*raw)
- }
-}
-
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct PerformanceInfo {
pub name: String,