macro_rules! make_trait_kind {
(
$KindN:ident,
$ApplyN:ident,
$kind_string:literal,
()
) => { ... };
(
$KindN:ident,
$ApplyN:ident,
$kind_string:literal,
($($Generics:ident),+)
) => { ... };
}
Expand description
Generates a KindN
trait of a specific arity and its corresponding blanket implementation.
This macro creates traits that represent type-level applications for different kind arities.
Each generated trait has an Output
associated type that represents the concrete type
produced when the brand is applied to the appropriate type parameters.
ยงParameters
$KindN
: The name of the trait to generate (e.g.,Kind0
,Kind1
,Kind2
).$ApplyN
: The corresponding type alias name (e.g.,Apply0
,Apply1
,Apply2
).$kind_string
: A string representation of the kind (e.g.,"*"
,"* -> *"
,"* -> * -> *"
).$Generics
: A tuple of generic type parameters (e.g.,()
,(A)
,(A, B)
).