azul_core

Macro impl_callback

Source
macro_rules! impl_callback {
    ($callback_value:ident) => { ... };
}
Expand description

Implements Display, Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Hash for a Callback with a .0 field:

struct MyCallback(fn (&T));

// impl Display, Debug, etc. for MyCallback
impl_callback!(MyCallback);

This is necessary to work around for https://github.com/rust-lang/rust/issues/54508