Skip to main content

Module mem

Module mem 

Source
Expand description

Basic utilities for dealing with memory, values, and types.

Re-exports§

pub use crate::ptr::Alignment;

Structs§

Align
Zero-sized type that provides the alignment specified via the generic parameter.

Traits§

AsRepr
Type that is layout-compatible with a primitive representation.
AsReprMut
Type that is bi-directionally transmutable with a primitive representation.
ValidAlign
Trait indicating that Align<N> is a valid alignment.

Functions§

safe_transmute
Safely transmutes a value of one type to a value of another type of the same size.
transmute⚠
Version of transmute that performs size check at monomorphization-time.
transmute_unchecked⚠
Transmute between two types.