From ef967ae27d303bbb6f3a5ea9ff7b1bdfcf6c2637 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 5 Feb 2026 12:03:40 -0800 Subject: [Rust] Impl `Debug` for `BinaryViewType` --- rust/src/custom_binary_view.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rust/src/custom_binary_view.rs') diff --git a/rust/src/custom_binary_view.rs b/rust/src/custom_binary_view.rs index 13a124e9..4cd49931 100644 --- a/rust/src/custom_binary_view.rs +++ b/rust/src/custom_binary_view.rs @@ -18,6 +18,7 @@ use binaryninjacore_sys::*; pub use binaryninjacore_sys::BNModificationStatus as ModificationStatus; +use std::fmt::Debug; use std::marker::PhantomData; use std::mem::MaybeUninit; use std::os::raw::c_void; @@ -381,6 +382,15 @@ impl BinaryViewTypeBase for BinaryViewType { } } +impl Debug for BinaryViewType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("BinaryViewType") + .field("name", &self.name()) + .field("long_name", &self.long_name()) + .finish() + } +} + impl CoreArrayProvider for BinaryViewType { type Raw = *mut BNBinaryViewType; type Context = (); -- cgit v1.3.1