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.
Trait Implementations§
impl<A: Copy, B: Copy, C: Copy, D: Copy> Copy for Enum4<A, B, C, D>
impl<A: Eq, B: Eq, C: Eq, D: Eq> Eq for Enum4<A, B, C, D>
impl<A, B, C, D> StructuralPartialEq for Enum4<A, B, C, D>
Auto Trait Implementations§
impl<A, B, C, D> Freeze for Enum4<A, B, C, D>
impl<A, B, C, D> RefUnwindSafe for Enum4<A, B, C, D>
impl<A, B, C, D> Send for Enum4<A, B, C, D>
impl<A, B, C, D> Sync for Enum4<A, B, C, D>
impl<A, B, C, D> Unpin for Enum4<A, B, C, D>
impl<A, B, C, D> UnwindSafe for Enum4<A, B, C, D>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more