summaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2026-02-05 12:03:15 -0800
committerMason Reed <35282038+emesare@users.noreply.github.com>2026-02-23 00:09:44 -0800
commit13e7701c86c284513091a93f37a68d320073dc41 (patch)
treedcdcc78aa98452a396bde41a5fb6faef425cd8b0 /rust
parentb9e1d7be12e6e9ff41cced5aabf1b54109aade3c (diff)
[Rust] Add `BinaryViewExt::type_libraries`
Diffstat (limited to 'rust')
-rw-r--r--rust/src/binary_view.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/src/binary_view.rs b/rust/src/binary_view.rs
index 9f9faa5b..478b8265 100644
--- a/rust/src/binary_view.rs
+++ b/rust/src/binary_view.rs
@@ -2134,6 +2134,12 @@ pub trait BinaryViewExt: BinaryViewBase {
unsafe { TypeContainer::from_raw(type_container_ptr.unwrap()) }
}
+ fn type_libraries(&self) -> Array<TypeLibrary> {
+ let mut count = 0;
+ let result = unsafe { BNGetBinaryViewTypeLibraries(self.as_ref().handle, &mut count) };
+ unsafe { Array::new(result, count, ()) }
+ }
+
/// Make the contents of a type library available for type/import resolution
fn add_type_library(&self, library: &TypeLibrary) {
unsafe { BNAddBinaryViewTypeLibrary(self.as_ref().handle, library.as_raw()) }