macro_rules! new_op3_opt {
($s:ident, $name:expr, $(($t1:ident, $t2:ident, $t3:ident) -> $rt:ident { $f:expr }),*) => { ... };
}
Expand description
Defines a macro that simplifies the creation and implementation of three-input (ternary) operations with optional functionality.
This macro-rule is structured to declare and implement a new ternary operation by accepting an identifier, a name, and a sequence of type transformations that results in a function.
It leverages other internal macros, such as impl_basic!
and impl_op3_opt!
, to automatically generate and bind necessary implementations.
The impl_basic!
macro assists in setting up basic structure and namespacing for the operation, while impl_op3_opt!
is likely responsible for the implementation details and handling optional features across different inputs.
The macro also implements the Enumerator3
trait from the forward::enumeration
module for the specified identifier, providing enumeration capabilities for the new operation in a modular and reusable manner.