1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! An assortment of non-owning containers.
//!
//! All of these containers have some option to construct them from one (or more) slices of the
//! underlying types instead of allocating resources dynamically.
pub use Map;
pub use Ordered;
pub use Partial;
pub use Slice;
pub use ;
/// A sort of `Vec` on initialized data.
pub type List<'a, T> = ;
/// A 'drop-in' replacement for the interface of `alloc`, excluding instantiation.
///
/// Most processing tasks require some memory. But a strict `no_std` crate can not allocate on its
/// own, so it needs to calling code to pass the memory to it. This is easy when the interface can
/// use a generic slice or uninitialized memory. However, when a specific container is expected
/// (e.g. a map or vector) then the type must actually exist in the type system.
///
/// The rust standard library declares its containers in the `alloc` crate but using it conflicts
/// with struct `no_std`, since linking it will require an allocator already. The replacements
/// declarations here offer an *interface* similar to the standard containers but are uninhabited,
/// they can't be instantiated.
///
/// This allows writing methods that look as if they utilize a borrowed `::alloc::Vec` without
/// depending on `alloc` which greatly reduces the number of feature dependent `#[cfg]` switches
/// present in the code.