def_kind

Macro def_kind 

Source
def_kind!() { /* proc-macro */ }
Expand description

Defines a new Kind trait.

This macro generates a trait definition for a Higher-Kinded Type signature. It takes the same three arguments as Kind!:

  1. Lifetimes
  2. Types
  3. Output Bounds

The generated trait includes a single associated type Of.

§Example

// Defines a Kind trait for a signature with:
// - 1 lifetime ('a)
// - 1 type parameter (T) bounded by Display
// - Output type bounded by Debug
def_kind!(('a), (T: Display), (Debug));