pub trait UnionAt<I, X> {
type Pruned;
fn inject(x: X) -> Self;
unsafe fn take(self) -> X;
}
Expand description
This trait is implemented for Unions where variant I has type X.
The coproduct minus its Ith variant
Create a union that contains the given value.
Convert a union to the contained type.
If the active variant of the coproduct is not at index I,
calling this method is undefined behaviour.