macro_rules! impl_callback {
($callback_value:ident, $callback_ty:ty) => { ... };
}Expand description
Implements Display, Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord
for a callback struct with .cb (function pointer) and .ctx (OptionRefAny) fields.
Also implements From<$callback_ty> to create a callback from a raw function pointer.
For callbacks with only a .cb field (no .ctx), use [impl_callback_simple!] instead.
This is necessary to work around for https://github.com/rust-lang/rust/issues/54508