Module prelude

Source
Expand description

Frequently used items which would typically be included in most contexts.

When adding no_std support to a crate for the first time, often there’s a substantial refactor required due to the change in implicit prelude from std::prelude to core::prelude. This unfortunately leaves out many items from alloc, even if the crate unconditionally includes that crate.

This prelude aims to ease the transition by re-exporting items from alloc which would otherwise be included in the std implicit prelude.

Modules§

vec
A contiguous growable array type with heap-allocated contents, written Vec<T>.

Macros§

format
Creates a String using interpolation of runtime expressions.
vec
Creates a Vec containing the arguments.

Structs§

Box
A pointer type that uniquely owns a heap allocation of type T.
String
A UTF-8–encoded, growable string.
Vec
A contiguous growable array type, written as Vec<T>, short for ‘vector’.

Traits§

ToOwned
A generalization of Clone to borrowed data.
ToString
A trait for converting a value to a String.