[−][src]Trait safe_transmute::PodTransmutable
Type that can be non-unsafely transmuted into
In most cases this is a POD class or a trivially copyable class.
Marker trait for guarded_transmute_pod_*() functions.
Warning: if you transmute into a floating-point type you will have a chance to create a signaling NaN,
which, while not illegal, can be unwieldy. Check out util::designalise_f{32,64}()
for a remedy.
Nota bene: guarded transmutation to bools is provided as separate functions, because they're
restricted to being 0 or 1, which means that an additional value check is required.
Safety
It is only safe to implement PodTransmutable for a type T if it is safe for a slice of any arbitrary data
&[u8] of length sizeof<T>() to be transmute()d
to a unit-length &[T].
Consult the Transmutes section of the Nomicon for more details.
Implementations on Foreign Types
impl PodTransmutable for u8[src]
impl PodTransmutable for u8impl PodTransmutable for i8[src]
impl PodTransmutable for i8impl PodTransmutable for u16[src]
impl PodTransmutable for u16impl PodTransmutable for i16[src]
impl PodTransmutable for i16impl PodTransmutable for u32[src]
impl PodTransmutable for u32impl PodTransmutable for i32[src]
impl PodTransmutable for i32impl PodTransmutable for u64[src]
impl PodTransmutable for u64impl PodTransmutable for i64[src]
impl PodTransmutable for i64impl PodTransmutable for usize[src]
impl PodTransmutable for usizeimpl PodTransmutable for isize[src]
impl PodTransmutable for isizeimpl PodTransmutable for f32[src]
impl PodTransmutable for f32impl PodTransmutable for f64[src]
impl PodTransmutable for f64impl<T: PodTransmutable> PodTransmutable for [T; 1][src]
impl<T: PodTransmutable> PodTransmutable for [T; 1]impl<T: PodTransmutable> PodTransmutable for [T; 2][src]
impl<T: PodTransmutable> PodTransmutable for [T; 2]impl<T: PodTransmutable> PodTransmutable for [T; 3][src]
impl<T: PodTransmutable> PodTransmutable for [T; 3]impl<T: PodTransmutable> PodTransmutable for [T; 4][src]
impl<T: PodTransmutable> PodTransmutable for [T; 4]impl<T: PodTransmutable> PodTransmutable for [T; 5][src]
impl<T: PodTransmutable> PodTransmutable for [T; 5]impl<T: PodTransmutable> PodTransmutable for [T; 6][src]
impl<T: PodTransmutable> PodTransmutable for [T; 6]impl<T: PodTransmutable> PodTransmutable for [T; 7][src]
impl<T: PodTransmutable> PodTransmutable for [T; 7]impl<T: PodTransmutable> PodTransmutable for [T; 8][src]
impl<T: PodTransmutable> PodTransmutable for [T; 8]impl<T: PodTransmutable> PodTransmutable for [T; 9][src]
impl<T: PodTransmutable> PodTransmutable for [T; 9]impl<T: PodTransmutable> PodTransmutable for [T; 10][src]
impl<T: PodTransmutable> PodTransmutable for [T; 10]impl<T: PodTransmutable> PodTransmutable for [T; 11][src]
impl<T: PodTransmutable> PodTransmutable for [T; 11]impl<T: PodTransmutable> PodTransmutable for [T; 12][src]
impl<T: PodTransmutable> PodTransmutable for [T; 12]impl<T: PodTransmutable> PodTransmutable for [T; 13][src]
impl<T: PodTransmutable> PodTransmutable for [T; 13]impl<T: PodTransmutable> PodTransmutable for [T; 14][src]
impl<T: PodTransmutable> PodTransmutable for [T; 14]impl<T: PodTransmutable> PodTransmutable for [T; 15][src]
impl<T: PodTransmutable> PodTransmutable for [T; 15]impl<T: PodTransmutable> PodTransmutable for [T; 16][src]
impl<T: PodTransmutable> PodTransmutable for [T; 16]impl<T: PodTransmutable> PodTransmutable for [T; 17][src]
impl<T: PodTransmutable> PodTransmutable for [T; 17]impl<T: PodTransmutable> PodTransmutable for [T; 18][src]
impl<T: PodTransmutable> PodTransmutable for [T; 18]impl<T: PodTransmutable> PodTransmutable for [T; 19][src]
impl<T: PodTransmutable> PodTransmutable for [T; 19]impl<T: PodTransmutable> PodTransmutable for [T; 20][src]
impl<T: PodTransmutable> PodTransmutable for [T; 20]impl<T: PodTransmutable> PodTransmutable for [T; 21][src]
impl<T: PodTransmutable> PodTransmutable for [T; 21]impl<T: PodTransmutable> PodTransmutable for [T; 22][src]
impl<T: PodTransmutable> PodTransmutable for [T; 22]impl<T: PodTransmutable> PodTransmutable for [T; 23][src]
impl<T: PodTransmutable> PodTransmutable for [T; 23]impl<T: PodTransmutable> PodTransmutable for [T; 24][src]
impl<T: PodTransmutable> PodTransmutable for [T; 24]impl<T: PodTransmutable> PodTransmutable for [T; 25][src]
impl<T: PodTransmutable> PodTransmutable for [T; 25]impl<T: PodTransmutable> PodTransmutable for [T; 26][src]
impl<T: PodTransmutable> PodTransmutable for [T; 26]impl<T: PodTransmutable> PodTransmutable for [T; 27][src]
impl<T: PodTransmutable> PodTransmutable for [T; 27]impl<T: PodTransmutable> PodTransmutable for [T; 28][src]
impl<T: PodTransmutable> PodTransmutable for [T; 28]impl<T: PodTransmutable> PodTransmutable for [T; 29][src]
impl<T: PodTransmutable> PodTransmutable for [T; 29]impl<T: PodTransmutable> PodTransmutable for [T; 30][src]
impl<T: PodTransmutable> PodTransmutable for [T; 30]impl<T: PodTransmutable> PodTransmutable for [T; 31][src]
impl<T: PodTransmutable> PodTransmutable for [T; 31]impl<T: PodTransmutable> PodTransmutable for [T; 32][src]
impl<T: PodTransmutable> PodTransmutable for [T; 32]