diff options
Diffstat (limited to 'rust/src/binary_view.rs')
| -rw-r--r-- | rust/src/binary_view.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/src/binary_view.rs b/rust/src/binary_view.rs index bd26dad3..b65367a2 100644 --- a/rust/src/binary_view.rs +++ b/rust/src/binary_view.rs @@ -2709,6 +2709,12 @@ pub trait BinaryViewEventHandler: 'static + Sync { fn on_event(&self, binary_view: &BinaryView); } +impl<F: Fn(&BinaryView) + 'static + Sync> BinaryViewEventHandler for F { + fn on_event(&self, binary_view: &BinaryView) { + self(binary_view); + } +} + /// Registers an event listener for binary view events. /// /// # Example |
