pub enum Enum4<A, B, C, D> {
A(A),
B(B),
C(C),
D(D),
}
Expand description
An unpacked version of Union4
.
Variants
A(A)
B(B)
C(C)
D(D)
Implementations
sourceimpl<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
sourceimpl<A: PartialEq, B: PartialEq, C: PartialEq, D: PartialEq> PartialEq<Enum4<A, B, C, D>> for Enum4<A, B, C, D>
impl<A: PartialEq, B: PartialEq, C: PartialEq, D: PartialEq> PartialEq<Enum4<A, B, C, D>> for Enum4<A, B, C, D>
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> StructuralEq 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> RefUnwindSafe for Enum4<A, B, C, D> where
A: RefUnwindSafe,
B: RefUnwindSafe,
C: RefUnwindSafe,
D: RefUnwindSafe,
impl<A, B, C, D> Send for Enum4<A, B, C, D> where
A: Send,
B: Send,
C: Send,
D: Send,
impl<A, B, C, D> Sync for Enum4<A, B, C, D> where
A: Sync,
B: Sync,
C: Sync,
D: Sync,
impl<A, B, C, D> Unpin for Enum4<A, B, C, D> where
A: Unpin,
B: Unpin,
C: Unpin,
D: Unpin,
impl<A, B, C, D> UnwindSafe for Enum4<A, B, C, D> where
A: UnwindSafe,
B: UnwindSafe,
C: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Erasable for T
impl<T> Erasable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more