transmute

transmute (비트 변환)

타입 검사 없이 값을 타입 T 에서 U 로 재해석하는 내장 함수예요.

출처: Rust 공식 문서

본문

타입 검사 없이 값을 타입 Src 에서 Dst 로 재해석(reinterpret)해요. 두 타입의 크기는 같아야 해요. 컴파일러가 안전할 수 없음을 증명할 수 있게 신중히 사용해야 해요. 안정화된 버전은 core::mem::transmute 이에요.

pub const unsafe fn transmute<Src, Dst>(src: Src) -> Dst 👎 Deprecated: import this function via std::mem instead

더 알아보기 (Learn more)

Rust 공식 문서