Trait kernel::init::Zeroable

source ·
pub unsafe trait Zeroable { }
Expand description

Marker trait for types that can be initialized by writing just zeroes.

Safety

The bit pattern consisting of only zeroes is a valid bit pattern for this type. In other words, this is not UB:

let val: Self = unsafe { core::mem::zeroed() };

Implementations on Foreign Types§

source§

impl<T> Zeroable for *mut T

source§

impl Zeroable for i32

source§

impl<D: Zeroable, E: Zeroable, F: Zeroable, G: Zeroable, H: Zeroable, I: Zeroable, J: Zeroable> Zeroable for (D, E, F, G, H, I, J)

source§

impl Zeroable for i8

source§

impl Zeroable for Option<NonZeroU64>

source§

impl<J: Zeroable> Zeroable for (J,)

source§

impl Zeroable for Option<NonZeroI16>

source§

impl Zeroable for Option<NonZeroIsize>

source§

impl<T> Zeroable for *const [T]

source§

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

source§

impl<H: Zeroable, I: Zeroable, J: Zeroable> Zeroable for (H, I, J)

source§

impl<G: Zeroable, H: Zeroable, I: Zeroable, J: Zeroable> Zeroable for (G, H, I, J)

source§

impl Zeroable for Option<NonZeroI32>

source§

impl<T: ?Sized> Zeroable for PhantomData<T>

source§

impl Zeroable for Option<NonZeroUsize>

source§

impl Zeroable for f64

source§

impl Zeroable for *mut str

source§

impl Zeroable for i16

source§

impl Zeroable for PhantomPinned

source§

impl Zeroable for u128

source§

impl<I: Zeroable, J: Zeroable> Zeroable for (I, J)

source§

impl Zeroable for char

source§

impl Zeroable for *const str

source§

impl<T> Zeroable for *mut [T]

source§

impl Zeroable for bool

source§

impl Zeroable for Option<NonZeroI128>

source§

impl<T: ?Sized + Zeroable> Zeroable for UnsafeCell<T>

source§

impl Zeroable for Option<NonZeroU16>

source§

impl Zeroable for Infallible

source§

impl Zeroable for Option<NonZeroU128>

source§

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

source§

impl<T> Zeroable for *const T

source§

impl<T: ?Sized> Zeroable for Option<Box<T>>

source§

impl<F: Zeroable, G: Zeroable, H: Zeroable, I: Zeroable, J: Zeroable> Zeroable for (F, G, H, I, J)

source§

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

source§

impl Zeroable for Option<NonZeroI8>

source§

impl Zeroable for Option<NonZeroU32>

source§

impl<T: ?Sized> Zeroable for Option<NonNull<T>>

source§

impl Zeroable for u16

source§

impl Zeroable for ()

source§

impl Zeroable for i128

source§

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

source§

impl Zeroable for usize

source§

impl Zeroable for u32

source§

impl Zeroable for f32

source§

impl Zeroable for u64

source§

impl<E: Zeroable, F: Zeroable, G: Zeroable, H: Zeroable, I: Zeroable, J: Zeroable> Zeroable for (E, F, G, H, I, J)

source§

impl Zeroable for isize

source§

impl Zeroable for u8

source§

impl Zeroable for i64

source§

impl Zeroable for Option<NonZeroI64>

source§

impl<T: Zeroable> Zeroable for Wrapping<T>

source§

impl Zeroable for Option<NonZeroU8>

source§

impl<T> Zeroable for MaybeUninit<T>

Implementors§

source§

impl<T> Zeroable for Opaque<T>

This documentation is an old archive. Please see https://rust.docs.kernel.org instead.