[][src]Struct abi_stable::abi_stability::stable_abi_trait::UnsafeOpaqueField

#[repr(transparent)]pub struct UnsafeOpaqueField<T>(_);

Allows one to create the TypeLayout for any type T, by pretending that it is a primitive type.

Used by the StableAbi derive macro by fields marker as #[sabi(unsafe_opaque_field)].

Safety

You must ensure that the layout of T is compatible through other means.

Trait Implementations

impl<T> GetStaticEquivalent_ for UnsafeOpaqueField<T>[src]

type StaticEquivalent = ()

it is fine to use () because this type is treated as opaque anyway.

impl<T> StableAbi for UnsafeOpaqueField<T>[src]

type IsNonZeroType = False

Whether this type has a single invalid bit-pattern. Read more

Auto Trait Implementations

impl<T> RefUnwindSafe for UnsafeOpaqueField<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for UnsafeOpaqueField<T> where
    T: Send
[src]

impl<T> Sync for UnsafeOpaqueField<T> where
    T: Sync
[src]

impl<T> Unpin for UnsafeOpaqueField<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for UnsafeOpaqueField<T> where
    T: UnwindSafe
[src]

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