Expand description
Modules§
- cell
- Shareable mutable containers.
Macros§
- addr_of
core
Create aconst
raw pointer to a place, without creating an intermediate reference.- addr_
of_ mut core
Create amut
raw pointer to a place, without creating an intermediate reference.- cswap
- Swaps two mutable variables in a compile-time friendly manner.
- offset_
of core
Expands to the offset in bytes of a field from the beginning of the given type.- pin
core
Constructs aPin<&mut T>
, by pinning avalue: T
locally.- size_
of_ expr - Returns the size of an expression in bytes.
Structs§
- Alloc
- 🌐 Memory-allocation-related operations.
- BareBox
- A no-op pointer type, like a
Box
but without affecting howT
is stored. - Box
alloc
alloc
A pointer type that uniquely owns a heap allocation of typeT
.- Boxed
alloc
- A zero-sized marker for a
Storage
type that wraps its data in aBox
. - Cache
Align - Aligns and pads a value to the length of a cache line.
- Current
std
andunsafe_layout
- A marker object representing the current instance of a type
T
. - Current
Guard std
andunsafe_layout
- A guard that temporarily sets a global current pointer for
T
, restoring the old one on drop. - Discriminant
core
Opaque type representing the discriminant of an enum.- FatPtr
- Represents a fat pointer with separate data and metadata pointers.
- Manually
Drop core
A wrapper to inhibit compiler from automatically callingT
’s destructor.- Mem
- 🌐 Memory-related operations.
- MemLayout
alloc
alloc
Layout of a block of memory.- MemLayout
Error alloc
- 🚩
alloc
TheMemLayout
parameters violated constraints. - Pin
core
A pointer which pins its pointee in place.- Pinned
unsafe_ptr
- A wrapper for structurally pinned data.
- Ptr
- 🌐 Pointer-related operations.
- PtrNon
Null 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
- 🌐 Slice-related operations, most of them const.
- System
Alloc std
std
The default memory allocator provided by the operating system.
Enums§
- Cow
alloc
alloc
A clone-on-write smart pointer.
Traits§
- BitSized
- Type size information in bits.
- Borrow
core
A trait for borrowing data.- Borrow
Mut core
A trait for mutably borrowing data.- Byte
Sized - Type size information in bytes.
- ExtMem
- 🌐 Extension trait for type memory information and manipulation.
- ExtSlice
- 🌐
Extension trait providing additional methods for
&[T]
. - ExtSlice
Mut - 🌐
Extension trait providing additional methods for
&mut [T]
. - Global
Alloc alloc
alloc
A memory allocator that can be registered as the standard library’s default.- MemAligned
- 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.
- Sized
core
Types with a constant size known at compile time.- Storage
- Allows to be generic in respect of the data storage.
- ToOwned
alloc
alloc
A generalization of Clone to borrowed data.
Functions§
- transmute⚠
Deprecated core
Reinterprets the bits of a value of one type as another type.
Type Aliases§
Unions§
- Maybe
Uninit core
A wrapper type to construct uninitialized instances ofT
.