[][src]Function typic::transmute_safe

pub fn transmute_safe<T, U>(from: T) -> U where
    U: Transparent + FromType<T, Relax, Safe>, 

A safe and sound value-to-value conversion.

Consumes a value of type T and produces a value of type U by reinterpreting that value's bits.

This will only convert T into U when:

  1. T is soundly transmutable into U, and
  2. T is safely transmutable into U.

See also TransmuteInto and TransmuteFrom.