[][src]Union abi_stable::utils::Transmuter

#[repr(C)]pub union Transmuter<T: Copy, U: Copy> {
    pub from: T,
    pub to: U,
}

Helper type for transmuting between Copy types without adding any overhead in debug builds.

Safety

Be aware that using this type is equivalent to using std::mem::transmute_copy, which doesn't check that T and U have the same size.

Fields

from: Tto: U

Auto Trait Implementations

impl<T, U> RefUnwindSafe for Transmuter<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

impl<T, U> Send for Transmuter<T, U> where
    T: Send,
    U: Send

impl<T, U> Sync for Transmuter<T, U> where
    T: Sync,
    U: Sync

impl<T, U> Unpin for Transmuter<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> UnwindSafe for Transmuter<T, U> where
    T: UnwindSafe,
    U: UnwindSafe

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> From<T> for T[src]

impl<T> GetWithMetadata for T[src]

type ForSelf = WithMetadata_<T, T>

This is always WithMetadata_<Self, Self>

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

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

impl<This> TransmuteElement for This where
    This: ?Sized
[src]

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.

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

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

The error type returned when the conversion fails.

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

type Type = T

The same type as Self. Read more