diff options
Diffstat (limited to 'rust/src/background_task.rs')
| -rw-r--r-- | rust/src/background_task.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rust/src/background_task.rs b/rust/src/background_task.rs index ea1e3b0d..4899df8c 100644 --- a/rust/src/background_task.rs +++ b/rust/src/background_task.rs @@ -15,6 +15,7 @@ //! Background tasks provide plugins the ability to inform the core of long-running background tasks. use binaryninjacore_sys::*; +use std::fmt::Debug; use std::result; @@ -89,6 +90,17 @@ impl BackgroundTask { } } +impl Debug for BackgroundTask { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("BackgroundTask") + .field("progress_text", &self.progress_text()) + .field("can_cancel", &self.can_cancel()) + .field("is_cancelled", &self.is_cancelled()) + .field("is_finished", &self.is_finished()) + .finish() + } +} + unsafe impl RefCountable for BackgroundTask { unsafe fn inc_ref(handle: &Self) -> Ref<Self> { Ref::new(Self { |
