Trait sierra::Zeroable [−][src]
pub unsafe trait Zeroable { fn zeroed() -> Self { ... } }
Expand description
Trait for types that can be safely created with
zeroed
.
An all-zeroes value may or may not be the same value as the Default value of the type.
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
Implementations on Foreign Types
impl<A, B, C, D, E, F> Zeroable for (A, B, C, D, E, F) where
C: Zeroable,
E: Zeroable,
A: Zeroable,
B: Zeroable,
D: Zeroable,
F: Zeroable,
impl<A, B, C, D> Zeroable for (A, B, C, D) where
C: Zeroable,
A: Zeroable,
B: Zeroable,
D: Zeroable,
impl<A, B, C, D, E> Zeroable for (A, B, C, D, E) where
C: Zeroable,
E: Zeroable,
A: Zeroable,
B: Zeroable,
D: Zeroable,
impl<A, B, C, D, E, F, G> Zeroable for (A, B, C, D, E, F, G) where
C: Zeroable,
E: Zeroable,
A: Zeroable,
G: Zeroable,
B: Zeroable,
D: Zeroable,
F: Zeroable,
impl<A, B, C, D, E, F, G, H> Zeroable for (A, B, C, D, E, F, G, H) where
C: Zeroable,
E: Zeroable,
A: Zeroable,
G: Zeroable,
B: Zeroable,
H: Zeroable,
D: Zeroable,
F: Zeroable,