[][src]Struct ptr_union::Builder2

pub struct Builder2<A, B> { /* fields omitted */ }

A builder for Union2.

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

Implementations

impl<A, B> Builder2<A, B>[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> Builder2<A, B>[src]

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

Construct a union at this variant.

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

Construct a union at this variant.

Trait Implementations

impl<A, B> Clone for Builder2<A, B>[src]

impl<A, B> Copy for Builder2<A, B>[src]

impl<A, B> Debug for Builder2<A, B>[src]

Auto Trait Implementations

impl<A, B> Send for Builder2<A, B> where
    A: Send,
    B: Send

impl<A, B> Sync for Builder2<A, B> where
    A: Sync,
    B: Sync

impl<A, B> Unpin for Builder2<A, B> where
    A: Unpin,
    B: 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.