We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
BinaryViewEventHandler
Fn(&BinaryView)
1 parent c43ecea commit f9d2e6fCopy full SHA for f9d2e6f
1 file changed
rust/src/binary_view.rs
@@ -2709,6 +2709,12 @@ pub trait BinaryViewEventHandler: 'static + Sync {
2709
fn on_event(&self, binary_view: &BinaryView);
2710
}
2711
2712
+impl<F: Fn(&BinaryView) + 'static + Sync> BinaryViewEventHandler for F {
2713
+ fn on_event(&self, binary_view: &BinaryView) {
2714
+ self(binary_view);
2715
+ }
2716
+}
2717
+
2718
/// Registers an event listener for binary view events.
2719
///
2720
/// # Example
0 commit comments