Skip to main content

Module prelude

Module prelude 

Source
Expand description

Crate-internal prelude: fills the no_std gaps with alloc/core items. In std builds the std prelude already provides most of these; the glob import here is harmless (same types) and only activates under no_std.

Structs§

Arc
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
BTreeMap
An ordered map based on a B-Tree.
BTreeSet
An ordered set based on a B-Tree.
Box
A pointer type that uniquely owns a heap allocation of type T.
Duration
A Duration type to represent a span of time, typically used for system timeouts.
Ipv4Addr
An IPv4 address.
String
A UTF-8–encoded, growable string.
Vec
A contiguous growable array type, written as Vec<T>, short for ‘vector’.
Weak
Weak is a version of Arc that holds a non-owning reference to the managed allocation.

Enums§

Cow
A clone-on-write smart pointer.
IpAddr
An IP address, either IPv4 or IPv6.
SocketAddr
An internet socket address, either IPv4 or IPv6.

Traits§

ToOwned
A generalization of Clone to borrowed data.