macro_rules! define_pyclass_binary_operator_slot {
(
$lhs_trait:ident,
$rhs_trait:ident,
$lhs:ident,
$rhs:ident,
$generate_macro:ident,
$slot:ident,
$func_ty:ident,
) => { ... };
}
Expand description
Macro which expands to three items
- Trait for a lhs dunder e.g. add
- Trait for the corresponding rhs e.g. radd
- A macro which will use dtolnay specialisation to generate the shared slot for the two dunders