You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the feature you'd like to have? BNBinaryDataNotification would allow me to subscribe to data events emitted by BVs.
Is your feature request related to a problem?
I would like to write plugins using that api.
Are any alternative solutions acceptable?
Lot's of ideas on how to implement it, but the quick and easy one is probably preferable at this time.
Additional Information:
A quick and easy solution would be to expose the notifier as a trait and on callback init/register check for fn ptr equality for impls compared to a dummy struct to only subscribe to what's implemented.
For when this gets tackled we want to make sure that we can pass nullptrs to notification callbacks we are not registering, otherwise we will end up jumping to and from the core frequently, this is not the end of the world but here especially is crucial.
For context a lot of these callback structs are opt-in so passing nullptr to the field onMySymbolRegistered or whatever will mean that you are not interested in receiving that and the core will not add that to the list of functions to call.
The PR #6543 avoid the unnecessary jumping from core to rust if unimplemented, but at a cost:
For the custom implementation, it's more complex and require some boiler plate on the user part, this can be reduced once the feature associated_type_defaults is stabilize.
For the closure implementation, the call require one extra indirection due to the dyn FnMut.
Activity
emesare commentedon Mar 13, 2025
For when this gets tackled we want to make sure that we can pass nullptrs to notification callbacks we are not registering, otherwise we will end up jumping to and from the core frequently, this is not the end of the world but here especially is crucial.
For context a lot of these callback structs are opt-in so passing nullptr to the field
onMySymbolRegisteredor whatever will mean that you are not interested in receiving that and the core will not add that to the list of functions to call.rbran commentedon Apr 1, 2025
The PR #6543 avoid the unnecessary jumping from core to rust if unimplemented, but at a cost:
For the custom implementation, it's more complex and require some boiler plate on the user part, this can be reduced once the feature associated_type_defaults is stabilize.
For the closure implementation, the call require one extra indirection due to the
dyn FnMut.