Bug 1893155 - Part 6: Correct constant for minimum epoch day. r=spidermonkey-reviewer...
[gecko.git] / third_party / rust / slab / README.md
blob428138937ae8765e077de5c9e91a3f7badf73c65
1 # Slab
3 Pre-allocated storage for a uniform data type.
5 [![Crates.io][crates-badge]][crates-url]
6 [![Build Status][ci-badge]][ci-url]
8 [crates-badge]: https://img.shields.io/crates/v/slab
9 [crates-url]: https://crates.io/crates/slab
10 [ci-badge]: https://img.shields.io/github/actions/workflow/status/tokio-rs/slab/ci.yml?branch=master
11 [ci-url]: https://github.com/tokio-rs/slab/actions
13 [Documentation](https://docs.rs/slab)
15 ## Usage
17 To use `slab`, first add this to your `Cargo.toml`:
19 ```toml
20 [dependencies]
21 slab = "0.4"
22 ```
24 Next, add this to your crate:
26 ```rust
27 use slab::Slab;
29 let mut slab = Slab::new();
31 let hello = slab.insert("hello");
32 let world = slab.insert("world");
34 assert_eq!(slab[hello], "hello");
35 assert_eq!(slab[world], "world");
37 slab[world] = "earth";
38 assert_eq!(slab[world], "earth");
39 ```
41 See [documentation](https://docs.rs/slab) for more details.
43 ## License
45 This project is licensed under the [MIT license](LICENSE).
47 ### Contribution
49 Unless you explicitly state otherwise, any contribution intentionally submitted
50 for inclusion in `slab` by you, shall be licensed as MIT, without any additional
51 terms or conditions.