Most callback APIs define a trait ThisThingCallback and take that as a turbofish, but Rolloff3dCallback is instead a type alias to extern "system" fn and passed as an optional function parameter.
Either set_3d_rolloff_callback should adapt to the style used everywhere else, or everywhere else should specify the callback as a function argument. Switching from enum CallbackImpl {} to struct CallbackImpl; makes this reasonable, but I still have a slight preference for the version which is clearly just type-level, since the callback functionality needs to be sent to FMOD as static function pointers (i.e. no &self).
Most callback APIs define a
trait ThisThingCallback
and take that as a turbofish, butRolloff3dCallback
is instead a type alias toextern "system" fn
and passed as an optional function parameter.Either
set_3d_rolloff_callback
should adapt to the style used everywhere else, or everywhere else should specify the callback as a function argument. Switching fromenum CallbackImpl {}
tostruct CallbackImpl;
makes this reasonable, but I still have a slight preference for the version which is clearly just type-level, since the callback functionality needs to be sent to FMOD as static function pointers (i.e. no&self
).