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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// SPDX-License-Identifier: Apache-2.0
//
// Written in 2022-2026 by Dr. Maxim Orlovsky <orlovsky@ubideco.org>
//
// Copyright 2022-2026 Laboratories for Ubiquitous and Deterministic Computing,
// Institute for Distributed and Cognitive Computing (InDCS), Switzerland.
// All rights reserved.
//
// Copyright (C) 2022-2026 Dr Maxim Orlovsky.
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at <http://www.apache.org/licenses/LICENSE-2.0>
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
//! Generic traits for working with heap-allocated, allocator-aware and
//! fixed-capacity collection types.
//!
//! [`CollectionBase`] is the constructor-free root for sequences, sets, maps
//! and heaps. [`Collection`] and [`CollectionAlloc`] add constructors,
//! [`CollectionBytes`] provides byte lengths for byte buffers, and
//! [`CollectionCapacity`] provides fallible reservation and insertion.
//! [`CollectionSet`] and [`CollectionMap`] add set and map operations, while
//! [`CollectionEntry`] and [`MapEntry`] provide generic access to native map
//! entry APIs.
//!
//! The traits themselves need neither `alloc` nor a global allocator. The
//! `alloc` feature (implied by the default `std` feature) adds the
//! implementations for the collections of the `alloc` crate, and the
//! `heapless` feature adds them for fixed-capacity collections which work on
//! targets without a heap.
/// Re-export of `alloc` for no-`std` callers and macro expansion.
pub extern crate alloc;
/// Re-export of the optional `ascii` dependency.
pub extern crate ascii;
/// Re-export of the optional `hashbrown` dependency.
pub extern crate hashbrown;
/// Re-export of the optional `heapless` dependency.
pub extern crate heapless;
/// Re-export of the optional `indexmap` dependency.
pub extern crate indexmap;
pub extern crate std;
pub use ;
pub use ;
;