typewit

Trait TypeWitnessTypeArg

Source
pub trait TypeWitnessTypeArg {
    type Arg: ?Sized;
}
Expand description

Gets the type argument that this type witness witnesses.

example shared with MakeTypeWitness

A type witness is an enum whose variants only have TypeEq fields. Each variant requires the enum’s type parameter to be a specific type.

This trait should be implemented generically, as generic as the type definition of the implementor, doing so will help type inference.

Required Associated Types§

Source

type Arg: ?Sized

The type parameter used for type witnesses.

Usually, enums that implement this trait have variants with TypeEq<Self::Arg, SomeType> fields.

Implementors§