macro_rules! make_trait_kind {
(
$kind_trait_name:ident,
$lifetimes:tt,
$types:tt,
$kind_signature:literal
) => { ... };
(
@impl $kind_trait_name:ident,
(),
(),
$kind_signature:literal
) => { ... };
(
@impl $kind_trait_name:ident,
($($lifetimes:lifetime),+),
(),
$kind_signature:literal
) => { ... };
(
@impl $kind_trait_name:ident,
(),
($($types:ident),+),
$kind_signature:literal
) => { ... };
(
@impl $kind_trait_name:ident,
($($lifetimes:lifetime),+),
($($types:ident),+),
$kind_signature:literal
) => { ... };
}
Expand description
Generates a Kind
trait of a specific arity.
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
kind_trait_name
: Trait name (e.g.,Kind0L1T
).lifetimes
: Tuple of lifetime parameters (e.g.,('a, 'b)
).types
: Tuple of type parameters (e.g.,(A, B)
).kind_signature
: Kind signature (e.g.,"* -> *"
).