const_type_layout

Trait TypeLayout

Source
pub unsafe trait TypeLayout: Sized {
    const INHABITED: MaybeUninhabited;
    const TYPE_LAYOUT: TypeLayoutInfo<'static>;
}
Expand description

Utility trait that provides the shallow layout of a type.

§Safety

It is only safe to implement this trait if it accurately describes the type’s layout. Use #[derive(TypeLayout)] instead.

§Example

The struct Foo with u8 and u16 fields implements TypeLayout as follows:

struct Foo {
    a: u8,
    b: u16,
}

unsafe impl TypeLayout for Foo {
    const INHABITED: MaybeUninhabited = inhabited::all![u8, u16];

    const TYPE_LAYOUT: TypeLayoutInfo<'static> = TypeLayoutInfo {
        name: ::core::any::type_name::<Self>(),
        size: ::core::mem::size_of::<Self>(),
        alignment: ::core::mem::align_of::<Self>(),
        structure: TypeStructure::Struct {
            repr: "",
            fields: &[
                Field {
                    name: "a",
                    offset: MaybeUninhabited::new::<u8>(::core::mem::offset_of!(Self, a)),
                    ty: ::core::any::type_name::<u8>(),
                },
                Field {
                    name: "b",
                    offset: MaybeUninhabited::new::<u16>(::core::mem::offset_of!(Self, b)),
                    ty: ::core::any::type_name::<u16>(),
                },
            ],
        },
    };
}

Note that if you implement TypeLayout, you should also implement typeset::ComputeTypeSet for it.

Required Associated Constants§

Source

const INHABITED: MaybeUninhabited

Marker for whether the type is inhabited or uninhabited.

Source

const TYPE_LAYOUT: TypeLayoutInfo<'static>

Shallow layout of the type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TypeLayout for Ordering

Source§

impl TypeLayout for Infallible

Source§

const INHABITED: MaybeUninhabited = crate::MaybeUninhabited::Uninhabited

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl TypeLayout for c_void

Source§

impl TypeLayout for bool

Source§

impl TypeLayout for char

Source§

impl TypeLayout for f32

Source§

impl TypeLayout for f64

Source§

impl TypeLayout for i8

Source§

impl TypeLayout for i16

Source§

impl TypeLayout for i32

Source§

impl TypeLayout for i64

Source§

impl TypeLayout for i128

Source§

impl TypeLayout for isize

Source§

impl TypeLayout for !

Available on crate feature impl-never only.
Source§

const INHABITED: MaybeUninhabited = crate::MaybeUninhabited::Uninhabited

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl TypeLayout for u8

Source§

impl TypeLayout for u16

Source§

impl TypeLayout for u32

Source§

impl TypeLayout for u64

Source§

impl TypeLayout for u128

Source§

impl TypeLayout for ()

Source§

impl TypeLayout for usize

Source§

impl TypeLayout for PhantomPinned

Source§

impl TypeLayout for RangeFull

Source§

impl TypeLayout for AtomicBool

Available on crate feature impl-atomics and target_has_atomic_load_store="8" only.
Source§

impl TypeLayout for AtomicI8

Available on crate feature impl-atomics and target_has_atomic_load_store="8" only.
Source§

impl TypeLayout for AtomicI16

Available on crate feature impl-atomics and target_has_atomic_load_store="16" only.
Source§

impl TypeLayout for AtomicI32

Available on crate feature impl-atomics and target_has_atomic_load_store="32" only.
Source§

impl TypeLayout for AtomicI64

Available on crate feature impl-atomics and target_has_atomic_load_store="64" only.
Source§

impl TypeLayout for AtomicIsize

Available on crate feature impl-atomics and target_has_atomic_load_store="ptr" and 64-bit only.
Source§

impl TypeLayout for AtomicU8

Available on crate feature impl-atomics and target_has_atomic_load_store="8" only.
Source§

impl TypeLayout for AtomicU16

Available on crate feature impl-atomics and target_has_atomic_load_store="16" only.
Source§

impl TypeLayout for AtomicU32

Available on crate feature impl-atomics and target_has_atomic_load_store="32" only.
Source§

impl TypeLayout for AtomicU64

Available on crate feature impl-atomics and target_has_atomic_load_store="64" only.
Source§

impl TypeLayout for AtomicUsize

Available on crate feature impl-atomics and target_has_atomic_load_store="ptr" and 64-bit only.
Source§

impl TypeLayout for NonZeroI8

Source§

impl TypeLayout for NonZeroI16

Source§

impl TypeLayout for NonZeroI32

Source§

impl TypeLayout for NonZeroI64

Source§

impl TypeLayout for NonZeroI128

Source§

impl TypeLayout for NonZeroIsize

Source§

impl TypeLayout for NonZeroU8

Source§

impl TypeLayout for NonZeroU16

Source§

impl TypeLayout for NonZeroU32

Source§

impl TypeLayout for NonZeroU64

Source§

impl TypeLayout for NonZeroU128

Source§

impl TypeLayout for NonZeroUsize

Source§

impl<'a, T: TypeLayout + 'a> TypeLayout for &'a T

Source§

impl<'a, T: TypeLayout + 'a> TypeLayout for &'a mut T

Source§

impl<A: TypeLayout> TypeLayout for (A,)

Source§

impl<A: TypeLayout, B: TypeLayout> TypeLayout for (A, B)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout> TypeLayout for (A, B, C)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout> TypeLayout for (A, B, C, D)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout> TypeLayout for (A, B, C, D, E)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout> TypeLayout for (A, B, C, D, E, F)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout> TypeLayout for (A, B, C, D, E, F, G)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout> TypeLayout for (A, B, C, D, E, F, G, H)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout> TypeLayout for (A, B, C, D, E, F, G, H, I)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout> TypeLayout for (A, B, C, D, E, F, G, H, I, J)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout> TypeLayout for (A, B, C, D, E, F, G, H, I, J, K)

Source§

impl<A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout, L: TypeLayout> TypeLayout for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<B: TypeLayout, C: TypeLayout> TypeLayout for ControlFlow<B, C>

Source§

impl<Idx: TypeLayout> TypeLayout for Range<Idx>

Source§

const INHABITED: MaybeUninhabited = Idx::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<Idx: TypeLayout> TypeLayout for RangeFrom<Idx>

Source§

const INHABITED: MaybeUninhabited = Idx::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<Idx: TypeLayout> TypeLayout for RangeTo<Idx>

Source§

const INHABITED: MaybeUninhabited = Idx::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<Idx: TypeLayout> TypeLayout for RangeToInclusive<Idx>

Source§

const INHABITED: MaybeUninhabited = Idx::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<R: TypeLayout> TypeLayout for fn() -> R

Source§

impl<R: TypeLayout> TypeLayout for extern "C" fn() -> R

Source§

impl<R: TypeLayout> TypeLayout for unsafe fn() -> R

Source§

impl<R: TypeLayout> TypeLayout for unsafe extern "C" fn() -> R

Source§

impl<R: TypeLayout, A: TypeLayout> TypeLayout for fn(_: A) -> R

Source§

impl<R: TypeLayout, A: TypeLayout> TypeLayout for extern "C" fn(_: A) -> R

Source§

impl<R: TypeLayout, A: TypeLayout> TypeLayout for unsafe fn(_: A) -> R

Source§

impl<R: TypeLayout, A: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A) -> R

Source§

impl<R: TypeLayout, A: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout> TypeLayout for fn(_: A, _: B) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout> TypeLayout for unsafe fn(_: A, _: B) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout> TypeLayout for fn(_: A, _: B, _: C) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D, _: E) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D, _: E) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D, _: E) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K, ...) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout, L: TypeLayout> TypeLayout for fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K, _: L) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout, L: TypeLayout> TypeLayout for extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K, _: L) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout, L: TypeLayout> TypeLayout for unsafe fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K, _: L) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout, L: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K, _: L) -> R

Source§

impl<R: TypeLayout, A: TypeLayout, B: TypeLayout, C: TypeLayout, D: TypeLayout, E: TypeLayout, F: TypeLayout, G: TypeLayout, H: TypeLayout, I: TypeLayout, J: TypeLayout, K: TypeLayout, L: TypeLayout> TypeLayout for unsafe extern "C" fn(_: A, _: B, _: C, _: D, _: E, _: F, _: G, _: H, _: I, _: J, _: K, _: L, ...) -> R

Source§

impl<T> TypeLayout for PhantomData<T>

Source§

impl<T> TypeLayout for Discriminant<T>

Source§

impl<T: TypeLayout + Deref> TypeLayout for Pin<T>

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for Bound<T>

Source§

impl<T: TypeLayout> TypeLayout for Option<T>

Source§

impl<T: TypeLayout> TypeLayout for *const T

Source§

impl<T: TypeLayout> TypeLayout for *mut T

Source§

impl<T: TypeLayout> TypeLayout for OnceCell<T>

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for Cell<T>

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for SyncUnsafeCell<T>

Available on crate feature impl-sync-unsafe-cell only.
Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for UnsafeCell<T>

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for Reverse<T>

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for ManuallyDrop<T>

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for Saturating<T>

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for Wrapping<T>

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for NonNull<T>

Source§

impl<T: TypeLayout> TypeLayout for AtomicPtr<T>

Available on crate feature impl-atomics and target_has_atomic_load_store="ptr" and 64-bit only.
Source§

impl<T: TypeLayout> TypeLayout for Exclusive<T>

Available on crate feature impl-sync-exclusive only.
Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Source§

impl<T: TypeLayout> TypeLayout for MaybeUninit<T>

Source§

impl<T: TypeLayout, E: TypeLayout> TypeLayout for Result<T, E>

Source§

impl<T: TypeLayout, const N: usize> TypeLayout for [T; N]

Source§

const INHABITED: MaybeUninhabited = T::INHABITED

Source§

const TYPE_LAYOUT: TypeLayoutInfo<'static> = _

Implementors§