Module prelude

Source
Available on crate feature std only.
Expand description

Provides implementation for basic std types, without assuming we have a std library.

This module is used to avoid having #[cfg(feature = "no-std")] sprinkled around all crates that support no-std. It imports all types we would use from the stdlib, either from the lib itself, or from other sources in case stdlib isn’t available.

Modules§

fmt
Utilities for formatting and printing Strings.
sync
Useful synchronization primitives.
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.
Formatter
Configuration for formatting.
HashMap
A hash map implemented with quadratic probing and SIMD lookup.
HashSet
A hash set implemented as a HashMap where the value is ().
String
A UTF-8–encoded, growable string.
Vec
A contiguous growable array type, written as Vec<T>, short for ‘vector’.
ioError
The error type for I/O operations of the Read, Write, Seek, and associated traits.

Enums§

Entry
A view into a single entry in a map, which may either be vacant or occupied.
Result
Result is a type that represents either success (Ok) or failure (Err).

Traits§

Deref
Used for immutable dereferencing operations, like *v.
DerefMut
Used for mutable dereferencing operations, like in *v = 1;.
Display
Format trait for an empty format, {}.
Error
Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E>.
FromStr
Parse a value from a string
Read
The Read trait allows for reading bytes from a source.
ToOwned
A generalization of Clone to borrowed data.
ToString
A trait for converting a value to a String.
Write
A trait for objects which are byte-oriented sinks.