Skip to main content

ZeroableOption

Trait ZeroableOption 

Source
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§

Source§

impl ZeroableOption for NonZero<i8>

Source§

impl ZeroableOption for NonZero<i16>

Source§

impl ZeroableOption for NonZero<i32>

Source§

impl ZeroableOption for NonZero<i64>

Source§

impl ZeroableOption for NonZero<i128>

Source§

impl ZeroableOption for NonZero<isize>

Source§

impl ZeroableOption for NonZero<u8>

Source§

impl ZeroableOption for NonZero<u16>

Source§

impl ZeroableOption for NonZero<u32>

Source§

impl ZeroableOption for NonZero<u64>

Source§

impl ZeroableOption for NonZero<u128>

Source§

impl ZeroableOption for NonZero<usize>

Source§

impl<T> ZeroableOption for Box<T>

Source§

impl<T, U> ZeroableOption for fn(U₁, U₂, …, Uₙ) -> T

Implemented for function pointers with up to 20 arity.

Source§

impl<T, U> ZeroableOption for extern "C" fn(U₁, U₂, …, Uₙ) -> T

Implemented for function pointers with up to 20 arity.

Source§

impl<T, U> ZeroableOption for unsafe fn(U₁, U₂, …, Uₙ) -> T

Implemented for function pointers with up to 20 arity.

Source§

impl<T, U> ZeroableOption for unsafe extern "C" fn(U₁, U₂, …, Uₙ) -> T

Implemented for function pointers with up to 20 arity.

Source§

impl<T: ?Sized> ZeroableOption for &T

Source§

impl<T: ?Sized> ZeroableOption for &mut T

Source§

impl<T: ?Sized> ZeroableOption for NonNull<T>

Implementors§