Expand description
Modules§
- Shareable mutable containers.
Macros§
core
Create aconst
raw pointer to a place, without creating an intermediate reference.core
Create amut
raw pointer to a place, without creating an intermediate reference.- Swaps two mutable variables in a compile-time friendly manner.
core
Expands to the offset in bytes of a field from the beginning of the given type.- Returns the size of an expression in bytes.
Structs§
- Memory-allocation-related operations.
- An archived
BareBox
- Archived
Boxed alloc
An archivedBoxed
- A no-op pointer type, like a
Box
but without affecting howT
is stored. - The resolver for an archived
BareBox
- Box
alloc
alloc
A pointer type that uniquely owns a heap allocation of typeT
. - Boxed
alloc
- Boxed
Resolver alloc
The resolver for an archivedBoxed
- Aligns and pads a value to the length of a cache line.
core
Opaque type representing the discriminant of an enum.- Represents a fat pointer with separate data and metadata pointers.
- Layout
alloc
alloc
Layout of a block of memory. - Layout
Error alloc
alloc
The parameters given to aLayout
constructor did not satisfy the constraints. core
A wrapper to inhibit compiler from automatically callingT
’s destructor.- Memory-related operations.
core
A pointer which pins its pointee in place.- Pinned
unsafe_ptr
A wrapper for structurally pinned data. - Pointer-related operations.
core
*mut T
but non-zero and covariant.- Rc
alloc
alloc
A single-threaded reference-counting pointer. - RcWeak
alloc
alloc
A version ofRc
that holds a non-owning reference to the managed allocation. - Slice-related operations, most of them const.
Enums§
- Cow
alloc
alloc
A clone-on-write smart pointer.
Traits§
- Type size information in bits.
core
A trait for borrowing data.core
A trait for mutably borrowing data.- Type size information in bytes.
- Extension trait for type memory information and manipulation.
- Extension trait providing additional methods for
&[T]
. - Extension trait providing additional methods for
&mut [T]
. - Global
Alloc alloc
alloc
- Marker trait to verify memory alignment between two types.
- MemPod
unsafe_layout
Indicates a type is Plain Old Data, and meets specific memory layout guarantees. core
Types with a constant size known at compile time.- Allows to be generic in respect of the data storage.
- ToOwned
alloc
alloc
A generalization of Clone to borrowed data.
Functions§
- Returns the rounded up size in bytes from a size in bits.
- transmute⚠
Deprecated core
Reinterprets the bits of a value of one type as another type.
Type Aliases§
Unions§
core
A wrapper type to construct uninitialized instances ofT
.