pub struct TypeEq<L: ?Sized, R: ?Sized>(_);

Implementations

Constructs a TypeEq<L, L>.

Constructs a TypeEq<T, T>.

Swaps the type parameters of this TypeEq

Constructs a TypeEq<L, R>.

Safety

You must ensure that L is the same type as R, layout equivalence is not enough.

Hints to the compiler that a TypeEq<L, R> can only be constructed if L == R.

This function takes and returns val unmodified. This allows returning some value from an expression while hinting that L == R.

A no-op cast from L to R

Having a TypeEq<L, R> value proves that L and R are the same type.

A no-op cast from R to L

Having a TypeEq<L, R> value proves that L and R are the same type.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

A constant of the type witness

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.