1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 //! See [std::collections](../std/collections/index.html) for a detailed discussion of
14 //! collections in Rust.
16 #![crate_name = "collections"]
17 #![crate_type = "rlib"]
18 #![unstable(feature = "collections",
19 reason = "library is unlikely to be stabilized with the current \
20 layout and name, use std::collections instead",
22 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
23 html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
24 html_root_url = "https://doc.rust-lang.org/nightly/",
25 html_playground_url = "https://play.rust-lang.org/",
26 issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
27 test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
29 #![cfg_attr(test, allow(deprecated))] // rand
33 #![feature(allow_internal_unstable)]
34 #![feature(box_patterns)]
35 #![feature(box_syntax)]
36 #![cfg_attr(not(test), feature(char_escape_debug))]
37 #![feature(core_intrinsics)]
38 #![feature(dropck_eyepatch)]
39 #![feature(exact_size_is_empty)]
40 #![feature(fmt_internals)]
42 #![feature(generic_param_attrs)]
44 #![feature(inclusive_range)]
45 #![feature(lang_items)]
48 #![feature(placement_in)]
49 #![feature(placement_in_syntax)]
50 #![feature(placement_new_protocol)]
52 #![feature(slice_get_slice)]
53 #![feature(slice_patterns)]
54 #![feature(specialization)]
55 #![feature(staged_api)]
56 #![feature(trusted_len)]
59 #![feature(untagged_unions)]
60 #![cfg_attr(test, feature(rand, test))]
64 extern crate std_unicode;
74 pub use binary_heap::BinaryHeap;
76 pub use btree_map::BTreeMap;
78 pub use btree_set::BTreeSet;
80 pub use linked_list::LinkedList;
83 pub use enum_set::EnumSet;
85 pub use vec_deque::VecDeque;
87 pub use string::String;
91 // Needed for the vec! macro
110 #[stable(feature = "rust1", since = "1.0.0")]
112 //! A map based on a B-Tree.
113 #[stable(feature = "rust1", since = "1.0.0")]
114 pub use btree::map::*;
117 #[stable(feature = "rust1", since = "1.0.0")]
119 //! A set based on a B-Tree.
120 #[stable(feature = "rust1", since = "1.0.0")]
121 pub use btree::set::*;
126 pub use core::ops; // RangeFull
129 /// An endpoint of a range of keys.
130 #[unstable(feature = "collections_bound", issue = "27787")]
131 #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
133 /// An inclusive bound.
135 /// An exclusive bound.
137 /// An infinite endpoint. Indicates that there is no bound in this direction.
141 /// An intermediate trait for specialization of `Extend`.
143 trait SpecExtend<I: IntoIterator> {
144 /// Extends `self` with the contents of the given iterator.
145 fn spec_extend(&mut self, iter: I);