From c4ba6d79ae3b96d56cc6b3744e7c64e004ecd161 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Tue, 21 Apr 2026 18:10:51 -0700 Subject: [Rust] Refactor `binary_view` module - Remove the "viral" `BinaryViewExt` trait and its blanket impl - Split up the binary view type from the custom trait impl - Simplify and fix bugs regarding custom binary view initialization - Rewrite Minidump binary view example, parses the PE headers to create proper sections now - Add some extra documentation - Add unit test for custom binary view --- rust/src/file_metadata.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rust/src/file_metadata.rs') diff --git a/rust/src/file_metadata.rs b/rust/src/file_metadata.rs index b58daa55..7b8a60fd 100644 --- a/rust/src/file_metadata.rs +++ b/rust/src/file_metadata.rs @@ -30,7 +30,7 @@ use crate::project::file::ProjectFile; use std::ptr::NonNull; #[allow(unused_imports)] -use crate::custom_binary_view::BinaryViewType; +use crate::binary_view::BinaryViewType; new_id_type!(SessionId, usize); @@ -472,6 +472,9 @@ impl FileMetadata { /// The [`BinaryViewType`]s associated with this file. /// /// For example, opening a PE binary will have the following: "Raw", "PE". + /// + /// Because the type may not have been registered, and the actual [`BinaryViewType`] is not available, + /// we instead return the name of the view type. pub fn view_types(&self) -> Array { let mut count = 0; unsafe { -- cgit v1.3.1