pub enum Enum4<A, B, C, D> {
A(A),
B(B),
C(C),
D(D),
}
Expand description
An unpacked version of Union4
.
Variants§
Implementations§
source§impl<A: ErasablePtr, B: ErasablePtr, C: ErasablePtr, D: ErasablePtr> Enum4<A, B, C, D>
impl<A: ErasablePtr, B: ErasablePtr, C: ErasablePtr, D: ErasablePtr> Enum4<A, B, C, D>
sourcepub fn pack(self, builder: Builder4<A, B, C, D>) -> Union4<A, B, C, D>
pub fn pack(self, builder: Builder4<A, B, C, D>) -> Union4<A, B, C, D>
Pack this loose enum into a pointer union.
sourcepub fn try_pack(self) -> Result<Union4<A, B, C, D>, Self>
pub fn try_pack(self) -> Result<Union4<A, B, C, D>, Self>
Pack this loose enum into a pointer union.
sourcepub unsafe fn pack_unchecked(self) -> Union4<A, B, C, D>
pub unsafe fn pack_unchecked(self) -> Union4<A, B, C, D>
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.