pub unsafe trait ZeroableOption { }Expand description
Marker trait for types that allow Option<Self> to be set to all zeroes in order to write
None to that location.
§Safety
The implementer needs to ensure that unsafe impl Zeroable for Option<Self> {} is sound.
Implementations on Foreign Types§
impl ZeroableOption for NonZeroI8
impl ZeroableOption for NonZeroI16
impl ZeroableOption for NonZeroI32
impl ZeroableOption for NonZeroI64
impl ZeroableOption for NonZeroI128
impl ZeroableOption for NonZeroIsize
impl ZeroableOption for NonZeroU8
impl ZeroableOption for NonZeroU16
impl ZeroableOption for NonZeroU32
impl ZeroableOption for NonZeroU64
impl ZeroableOption for NonZeroU128
impl ZeroableOption for NonZeroUsize
impl<T> ZeroableOption for &T
impl<T> ZeroableOption for &mut T
impl<T> ZeroableOption for Box<T>
impl<T> ZeroableOption for NonNull<T>
impl<T, U> ZeroableOption for fn(U₁, U₂, …, Uₙ) -> T
Implemented for function pointers with up to 20 arity.
impl<T, U> ZeroableOption for extern "C" fn(U₁, U₂, …, Uₙ) -> T
Implemented for function pointers with up to 20 arity.
impl<T, U> ZeroableOption for unsafe fn(U₁, U₂, …, Uₙ) -> T
Implemented for function pointers with up to 20 arity.
impl<T, U> ZeroableOption for unsafe extern "C" fn(U₁, U₂, …, Uₙ) -> T
Implemented for function pointers with up to 20 arity.