# Module core::mem 1.0.0 [−] [src]

Basic functions for dealing with memory.

This module contains functions for querying the size and alignment of types, initializing and manipulating memory.

## Reexports

`pub use intrinsics::transmute;`

## Constants

POST_DROP_U16 | [Unstable]
POST_DROP_U32 | [Unstable]
POST_DROP_U64 | [Unstable]
POST_DROP_U8 | [Unstable]
POST_DROP_USIZE | [Unstable]

## Functions

align_of | Returns the alignment in memory for a type.
align_of_val | Returns the ABI-required minimum alignment of the type of the value that `val` points to
drop | Disposes of a value.
forget | Leaks a value into the void, consuming ownership and never running its destructor.
min_align_of | [Deprecated] Returns the ABI-required minimum alignment of a type
min_align_of_val | [Deprecated] Returns the ABI-required minimum alignment of the type of the value that `val` points to
replace | Replaces the value at a mutable location with a new one, returning the old value, without deinitializing or copying either one.
size_of | Returns the size of a type in bytes.
size_of_val | Returns the size of the given value in bytes.
swap | Swap the values at two mutable locations of the same type, without deinitializing or copying either one.
transmute_copy | Interprets `src` as `&U`, and then reads `src` without moving the contained value.
uninitialized | Bypasses Rust's normal memory-initialization checks by pretending to produce a value of type T, while doing nothing at all.
zeroed | Creates a value initialized to zero.
dropped | [Unstable] Creates a value initialized to an unspecified series of bytes.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)