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.

Required Associated Types

The coproduct minus its Ith variant

Required Methods

Create a union that contains the given value.

Convert a union to the contained type.

Safety

If the active variant of the coproduct is not at index I, calling this method is undefined behaviour.

Implementors