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
//! Data structures with extra flexible storage.
//!
//! This crate provides highly flexible container types (currently
//! [`Box`](crate::boxed::Box), [`Cow`](crate::borrow::Cow), and
//! [`Vec`](crate::vec::Vec)) which mimic the API provided in `std`,
//! with allocation flexibility going beyond what is supported by
//! unstable features such as `allocator-api`.
//!
//! Both `no-std` and `no-alloc` environments are supported.
//!
//! ## Highlights
//!
//! - Optional `alloc` support, such that application may easily alternate between fixed buffers and heap allocation.
//! - Custom allocator implementations, including the ability to spill from a small stack allocation to a heap allocation.
//! - Additional fallible update methods, allowing for more ergonomic fixed size collections and handling of allocation errors.
//! - `const` initializers.
//! - Support for inline collections.
//! - Custom index types and growth behavior to manage memory usage.
//!
//! ## Feature flags
//!
//! - The `std` flag (off by default) enables compatibility with the `std::error::Error` trait for error types, adds `io::Write` support to `Vec`, and also enables the `alloc` feature.
//! - With the `alloc` feature (on by default), access to the global allocator is enabled, and default constructors for allocated containers (such as `Vec::new`) are supported.
//! - The `allocator-api2` feature enables integration with the `allocator-api2` crate, which offers support for the `allocator-api` feature set on stable Rust. This can allow for allocators implementing the API to be passed to `Vec::new_in`.
//! - The `nightly` feature enables compatibility with the unstable Rust `allocator-api` feature. This requires a nightly Rust compiler build.
//! - The `zeroize` feature enables integration with the `zeroize` crate, including a zeroizing allocator. This can be used to automatically zero out allocated memory for allocated types, including the intermediate buffers produced during resizing in the case of `Vec`.
;
extern crate std;
extern crate alloc as alloc_crate;
pub
pub use ;