konst_kernel::type_eq

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§

Source§

impl<B> TypeWitnessTypeArg for BoolWitG<B>

Source§

type Arg = B

Source§

impl<L, R> TypeWitnessTypeArg for TypeEq<L, R>
where L: ?Sized, R: ?Sized,

Source§

type Arg = L

Source§

impl<L, R, W> TypeWitnessTypeArg for MetaBaseTypeWit<L, R, W>
where L: ?Sized, R: ?Sized,

Source§

type Arg = W