The cef_callback_impl
macro isn't all that complex - most of the heavy lifting here is getting done by the trait system. However, it is the jumping-off point into the trait system, so it's a good place to start looking at that.
For reference, here's the macro definition itself:
macro_rules! cef_callback_impl {
(impl $RefCounted:ty: $CType:ty {
$(fn $fn_name:ident(&mut $self:ident, $($field_name:ident: $field_ty:ty: $c_ty:ty),+ $(,)?) $(-> $ret:ty)? $body:block)+
}) => {
impl $RefCounted {