From 13e7701c86c284513091a93f37a68d320073dc41 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 5 Feb 2026 12:03:15 -0800 Subject: [Rust] Add `BinaryViewExt::type_libraries` --- rust/src/binary_view.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rust/src/binary_view.rs') 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 { + 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()) } -- cgit v1.3.1