Trait safe_transmute::PodTransmutable [] [src]

pub trait 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: bools aren't actually non-unsafe to transmute, because they're restricted to being 0 or 1, which means it's UB to transmute an arbitrary byte into a bool.

Implementations on Foreign Types

impl PodTransmutable for u8
[src]

impl PodTransmutable for i8
[src]

impl PodTransmutable for u16
[src]

impl PodTransmutable for i16
[src]

impl PodTransmutable for u32
[src]

impl PodTransmutable for i32
[src]

impl PodTransmutable for u64
[src]

impl PodTransmutable for i64
[src]

impl PodTransmutable for char
[src]

impl PodTransmutable for f32
[src]

impl PodTransmutable for f64
[src]

Implementors