[][src]Function typic::transmute_sound

pub unsafe fn transmute_sound<T, U>(from: T) -> U where
    U: FromType<T, Relax, Sound>, 

A 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.

It is unsafe, because U may be a user-defined type that enforces additional validity restrictions in its constructor(s). This function bypasses those restrictions, and may lead to later unsoundness.