Trait ZeroablePrimitive

pub unsafe trait ZeroablePrimitive: Sized + Copy

A marker trait for primitive types which can be zero.

This is an implementation detail for [NonZero]<T> which may disappear or be replaced at any time.

Safety

Types implementing this trait must be primitives that are valid when zeroed.

The associated Self::NonZeroInner type must have the same size+align as Self, but with a niche and bit validity making it so the following transmutes are sound:

(And, consequently, Self::NonZeroInner to Self.)

Associated Types

type NonZeroInner: Sized + Copy;

A type like Self but with a niche that includes zero.

Implementors