ReprC

Trait ReprC 

Source
pub unsafe trait ReprC {
    const CHECK: ();
}
Expand description

Ensures that the type implementing it is #[repr(C)]. This cannot be guaranteed in general, and therefore we rely on macros to achieve that. This is a marker trait.

§Safety

This is an inherently unsafe trait. Any type implementing it has to have #[repr(C)] set recursively.

Required Associated Constants§

Source

const CHECK: ()

This field is used for const checks only.

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 ReprC for bool

Source§

const CHECK: () = ()

Source§

impl ReprC for f32

Source§

const CHECK: () = ()

Source§

impl ReprC for f64

Source§

const CHECK: () = ()

Source§

impl ReprC for i8

Source§

const CHECK: () = ()

Source§

impl ReprC for i16

Source§

const CHECK: () = ()

Source§

impl ReprC for i32

Source§

const CHECK: () = ()

Source§

impl ReprC for i64

Source§

const CHECK: () = ()

Source§

impl ReprC for i128

Source§

const CHECK: () = ()

Source§

impl ReprC for isize

Source§

const CHECK: () = ()

Source§

impl ReprC for u8

Source§

const CHECK: () = ()

Source§

impl ReprC for u16

Source§

const CHECK: () = ()

Source§

impl ReprC for u32

Source§

const CHECK: () = ()

Source§

impl ReprC for u64

Source§

const CHECK: () = ()

Source§

impl ReprC for u128

Source§

const CHECK: () = ()

Source§

impl ReprC for ()

Source§

const CHECK: () = ()

Source§

impl ReprC for usize

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicBool

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicI8

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicI16

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicI32

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicI64

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicIsize

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicU8

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicU16

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicU32

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicU64

Source§

const CHECK: () = ()

Source§

impl ReprC for AtomicUsize

Source§

const CHECK: () = ()

Source§

impl<T> ReprC for PhantomData<T>

Source§

impl<T: ReprC> ReprC for *const T

Source§

const CHECK: () = ()

Source§

impl<T: ReprC> ReprC for *mut T

Source§

const CHECK: () = ()

Source§

impl<T: ReprC> ReprC for &T

Source§

const CHECK: () = ()

Source§

impl<T: ReprC> ReprC for &mut T

Source§

const CHECK: () = ()

Source§

impl<T: ReprC> ReprC for NonNull<T>

Source§

const CHECK: () = ()

Source§

impl<T: ReprC> ReprC for AtomicPtr<T>

Source§

const CHECK: () = ()

Source§

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

Source§

const CHECK: () = ()

Implementors§