[][src]Trait lokacore::Zeroable

pub unsafe trait Zeroable: Sized {
    fn zeroed() -> Self { ... }
}

Marker trait for types that can be safely made with zeroed.

Safety

  • Your type must be inhabited (eg: no Infallible).
  • Your type must be allowed to be an "all zeroes" bit pattern (eg: no NonNull<T>).

Provided methods

fn zeroed() -> Self

Calls zeroed.

This is a trait method so that you can write MyType::zeroed() in your code. It is a contract of this trait that if you implement it on your type you must not override this method. In the future this trait will become a #[marker] trait so that this is absolute. Until then just don't do it.

Loading content...

Implementations on Foreign Types

impl Zeroable for __m128i[src]

impl Zeroable for __m128[src]

impl Zeroable for __m128d[src]

impl Zeroable for __m256i[src]

impl Zeroable for __m256[src]

impl Zeroable for __m256d[src]

impl Zeroable for Option<NonZeroI8>[src]

impl Zeroable for Option<NonZeroI16>[src]

impl Zeroable for Option<NonZeroI32>[src]

impl Zeroable for Option<NonZeroI64>[src]

impl Zeroable for Option<NonZeroI128>[src]

impl Zeroable for Option<NonZeroIsize>[src]

impl Zeroable for Option<NonZeroU8>[src]

impl Zeroable for Option<NonZeroU16>[src]

impl Zeroable for Option<NonZeroU32>[src]

impl Zeroable for Option<NonZeroU64>[src]

impl Zeroable for Option<NonZeroU128>[src]

impl Zeroable for Option<NonZeroUsize>[src]

impl<T> Zeroable for Option<NonNull<T>>[src]

impl<T> Zeroable for PhantomData<T> where
    T: Zeroable
[src]

Loading content...

Implementors

impl Zeroable for ()[src]

impl Zeroable for m128[src]

impl Zeroable for m128d[src]

impl Zeroable for m128i[src]

impl Zeroable for bool[src]

impl Zeroable for char[src]

impl Zeroable for f32[src]

impl Zeroable for f64[src]

impl Zeroable for i8[src]

impl Zeroable for i16[src]

impl Zeroable for i32[src]

impl Zeroable for i64[src]

impl Zeroable for i128[src]

impl Zeroable for isize[src]

impl Zeroable for u8[src]

impl Zeroable for u16[src]

impl Zeroable for u32[src]

impl Zeroable for u64[src]

impl Zeroable for u128[src]

impl Zeroable for usize[src]

impl<T> Zeroable for *const T[src]

impl<T> Zeroable for *mut T[src]

impl<T> Zeroable for Align16<T> where
    T: Zeroable
[src]

impl<T> Zeroable for Align2<T> where
    T: Zeroable
[src]

impl<T> Zeroable for Align32<T> where
    T: Zeroable
[src]

impl<T> Zeroable for Align4<T> where
    T: Zeroable
[src]

impl<T> Zeroable for Align8<T> where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 0] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 1] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 2] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 3] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 4] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 5] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 6] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 7] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 8] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 9] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 10] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 11] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 12] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 13] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 14] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 15] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 16] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 17] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 18] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 19] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 20] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 21] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 22] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 23] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 24] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 25] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 26] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 27] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 28] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 29] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 30] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 31] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 32] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 48] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 64] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 96] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 128] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 256] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 512] where
    T: Zeroable
[src]

impl<T> Zeroable for [T; 1024] where
    T: Zeroable
[src]

Loading content...