Trait AlwaysValid

Source
pub unsafe trait AlwaysValid { }
Expand description

Types for which all possible bit patterns represent a valid value.

Note that MaybeUninit<T> and [T; 0] both implement this marker trait even when T does not.

This trait is safely derivable with #[derive(AlwaysValid)] when the derive feature is enabled.

§Safety

It is undefined behaviour to implement this trait for any type for which it exists a bit pattern that doesn’t represent a valid value.

Implementations on Foreign Types§

Source§

impl AlwaysValid for i8

Source§

impl AlwaysValid for i16

Source§

impl AlwaysValid for i32

Source§

impl AlwaysValid for i64

Source§

impl AlwaysValid for i128

Source§

impl AlwaysValid for isize

Source§

impl AlwaysValid for u8

Source§

impl AlwaysValid for u16

Source§

impl AlwaysValid for u32

Source§

impl AlwaysValid for u64

Source§

impl AlwaysValid for u128

Source§

impl AlwaysValid for ()

Source§

impl AlwaysValid for usize

Source§

impl<A> AlwaysValid for (A,)
where A: AlwaysValid,

Source§

impl<A, B> AlwaysValid for (A, B)
where A: AlwaysValid, B: AlwaysValid,

Source§

impl<A, B, C> AlwaysValid for (A, B, C)

Source§

impl<A, B, C, D> AlwaysValid for (A, B, C, D)

Source§

impl<A, B, C, D, E> AlwaysValid for (A, B, C, D, E)

Source§

impl<A, B, C, D, E, F> AlwaysValid for (A, B, C, D, E, F)

Source§

impl<A, B, C, D, E, F, G> AlwaysValid for (A, B, C, D, E, F, G)

Source§

impl<A, B, C, D, E, F, G, H> AlwaysValid for (A, B, C, D, E, F, G, H)

Source§

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

Source§

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

Source§

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

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> AlwaysValid for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<T> AlwaysValid for [T; 0]

Source§

impl<T> AlwaysValid for [T; 1]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 2]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 3]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 4]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 5]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 6]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 7]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 8]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 9]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 10]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 11]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 12]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 13]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 14]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 15]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 16]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 17]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 18]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 19]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 20]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 21]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 22]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 23]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 24]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 25]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 26]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 27]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 28]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 29]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 30]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 31]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for [T; 32]
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for Cell<T>
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for UnsafeCell<T>
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for ManuallyDrop<T>
where T: AlwaysValid,

Source§

impl<T> AlwaysValid for MaybeUninit<T>

Implementors§