pub enum Enum2<A, B> {
A(A),
B(B),
}
Expand description
An unpacked version of Union2
.
Variants§
Implementations§
source§impl<A: ErasablePtr, B: ErasablePtr> Enum2<A, B>
impl<A: ErasablePtr, B: ErasablePtr> Enum2<A, B>
sourcepub fn pack(self, builder: Builder2<A, B>) -> Union2<A, B>
pub fn pack(self, builder: Builder2<A, B>) -> Union2<A, B>
Pack this loose enum into a pointer union.
sourcepub unsafe fn pack_unchecked(self) -> Union2<A, B>
pub unsafe fn pack_unchecked(self) -> Union2<A, B>
Pack this loose enum into a pointer union.
Safety
The pointer packed must be properly aligned. Note that only the actually packed pointer is restricted, not any other pointer type involved in this definition.