[][src]Struct ptr_union::Builder4

pub struct Builder4<A, B, C, D = NeverPtr> { /* fields omitted */ }

A builder for Union4.

An instance of this builder means that Union4 parameterized with the same type arguments are safe to construct.

Implementations

impl<A, B, C, D> Builder4<A, B, C, D>[src]

pub const unsafe fn new_unchecked() -> Self[src]

Assert that creating pointer unions of these types is safe.

Safety

The pointer types must be erasable, and their alignment must meet the requirements of the target union type.

impl<A: ErasablePtr, B: ErasablePtr, C: ErasablePtr, D: ErasablePtr> Builder4<A, B, C, D>[src]

pub fn a(self, this: A) -> Union4<A, B, C, D>[src]

Construct a union at this variant.

pub fn b(self, this: B) -> Union4<A, B, C, D>[src]

Construct a union at this variant.

pub fn c(self, this: C) -> Union4<A, B, C, D>[src]

Construct a union at this variant.

pub fn d(self, this: D) -> Union4<A, B, C, D>[src]

Construct a union at this variant.

Trait Implementations

impl<A, B, C, D> Clone for Builder4<A, B, C, D>[src]

impl<A, B, C, D> Copy for Builder4<A, B, C, D>[src]

impl<A, B, C, D> Debug for Builder4<A, B, C, D>[src]

Auto Trait Implementations

impl<A, B, C, D> Send for Builder4<A, B, C, D> where
    A: Send,
    B: Send,
    C: Send,
    D: Send

impl<A, B, C, D> Sync for Builder4<A, B, C, D> where
    A: Sync,
    B: Sync,
    C: Sync,
    D: Sync

impl<A, B, C, D> Unpin for Builder4<A, B, C, D> where
    A: Unpin,
    B: Unpin,
    C: Unpin,
    D: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erasable for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.