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) for a detailed discussion of collections in Rust.
16 #![crate_name = "collections"]
17 #![unstable(feature = "collections")]
19 #![crate_type = "rlib"]
20 #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
21 html_favicon_url = "http://www.rust-lang.org/favicon.ico",
22 html_root_url = "http://doc.rust-lang.org/nightly/",
23 html_playground_url = "http://play.rust-lang.org/")]
26 #![feature(box_syntax)]
27 #![feature(box_patterns)]
29 #![feature(staged_api)]
30 #![feature(unboxed_closures)]
32 #![feature(unsafe_destructor)]
33 #![feature(unsafe_no_drop_flag)]
34 #![cfg_attr(test, feature(rand, rustc_private, test))]
35 #![cfg_attr(test, allow(deprecated))] // rand
46 #[cfg(test)] extern crate test;
47 #[cfg(test)] #[macro_use] extern crate std;
48 #[cfg(test)] #[macro_use] extern crate log;
50 pub use binary_heap::BinaryHeap;
51 pub use bit_vec::BitVec;
52 pub use bit_set::BitSet;
53 pub use btree_map::BTreeMap;
54 pub use btree_set::BTreeSet;
55 pub use linked_list::LinkedList;
56 pub use enum_set::EnumSet;
57 pub use vec_deque::VecDeque;
58 pub use string::String;
60 pub use vec_map::VecMap;
62 #[deprecated(since = "1.0.0", reason = "renamed to vec_deque")]
63 #[unstable(feature = "collections")]
64 pub use vec_deque as ring_buf;
66 #[deprecated(since = "1.0.0", reason = "renamed to linked_list")]
67 #[unstable(feature = "collections")]
68 pub use linked_list as dlist;
70 #[deprecated(since = "1.0.0", reason = "renamed to bit_vec")]
71 #[unstable(feature = "collections")]
72 pub use bit_vec as bitv;
74 #[deprecated(since = "1.0.0", reason = "renamed to bit_set")]
75 #[unstable(feature = "collections")]
76 pub use bit_set as bitv_set;
78 // Needed for the vec! macro
84 #[cfg(test)] #[macro_use] mod bench;
100 #[path = "borrow_stage0.rs"]
106 #[unstable(feature = "collections",
109 pub use bit::{BitVec, Iter};
111 #[deprecated(since = "1.0.0", reason = "renamed to BitVec")]
112 #[unstable(feature = "collections")]
113 pub use bit::BitVec as Bitv;
116 #[unstable(feature = "collections",
119 pub use bit::{BitSet, Union, Intersection, Difference, SymmetricDifference};
120 pub use bit::SetIter as Iter;
122 #[deprecated(since = "1.0.0", reason = "renamed to BitSet")]
123 #[unstable(feature = "collections")]
124 pub use bit::BitSet as BitvSet;
127 #[stable(feature = "rust1", since = "1.0.0")]
129 pub use btree::map::*;
132 #[stable(feature = "rust1", since = "1.0.0")]
134 pub use btree::set::*;
138 // FIXME(#14344) this shouldn't be necessary
140 pub fn fixme_14344_be_sure_to_link_to_collections() {}
144 pub use core::ops; // RangeFull
150 pub use core::clone::Clone;
151 pub use core::cmp::{PartialEq, Eq, PartialOrd, Ord};
152 pub use core::cmp::Ordering::{Less, Equal, Greater};
153 pub use core::iter::range;
154 pub use core::iter::{FromIterator, Extend, IteratorExt};
155 pub use core::iter::{Iterator, DoubleEndedIterator, RandomAccessIterator};
156 pub use core::iter::{ExactSizeIterator};
157 pub use core::marker::{Copy, Send, Sized, Sync};
158 pub use core::mem::drop;
159 pub use core::ops::{Drop, Fn, FnMut, FnOnce};
160 pub use core::option::Option;
161 pub use core::option::Option::{Some, None};
162 pub use core::ptr::PtrExt;
163 pub use core::result::Result;
164 pub use core::result::Result::{Ok, Err};
166 // in core and collections (may differ).
167 pub use slice::{AsSlice, SliceExt};
168 pub use str::{Str, StrExt};
170 // from other crates.
171 pub use alloc::boxed::Box;
172 pub use unicode::char::CharExt;
175 pub use borrow::IntoCow;
176 pub use slice::SliceConcatExt;
177 pub use string::{String, ToString};
181 /// An endpoint of a range of keys.
183 /// An inclusive bound.
185 /// An exclusive bound.
187 /// An infinite endpoint. Indicates that there is no bound in this direction.