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)]
30 #![feature(staged_api)]
31 #![feature(unboxed_closures)]
33 #![feature(unsafe_destructor)]
34 #![feature(unsafe_no_drop_flag)]
35 #![cfg_attr(test, feature(rand, rustc_private, test))]
36 #![cfg_attr(test, allow(deprecated))] // rand
47 #[cfg(test)] extern crate test;
48 #[cfg(test)] #[macro_use] extern crate std;
49 #[cfg(test)] #[macro_use] extern crate log;
51 pub use binary_heap::BinaryHeap;
53 pub use bitv_set::BitvSet;
54 pub use btree_map::BTreeMap;
55 pub use btree_set::BTreeSet;
57 pub use enum_set::EnumSet;
58 pub use ring_buf::RingBuf;
59 pub use string::String;
61 pub use vec_map::VecMap;
63 // Needed for the vec! macro
69 #[cfg(test)] #[macro_use] mod bench;
84 #[unstable(feature = "collections",
87 pub use bit::{Bitv, Iter};
90 #[unstable(feature = "collections",
93 pub use bit::{BitvSet, Union, Intersection, Difference, SymmetricDifference};
94 pub use bit::SetIter as Iter;
97 #[stable(feature = "rust1", since = "1.0.0")]
99 pub use btree::map::*;
102 #[stable(feature = "rust1", since = "1.0.0")]
104 pub use btree::set::*;
108 // FIXME(#14344) this shouldn't be necessary
110 pub fn fixme_14344_be_sure_to_link_to_collections() {}
114 pub use core::ops; // RangeFull
120 pub use core::borrow::IntoCow;
121 pub use core::clone::Clone;
122 pub use core::cmp::{PartialEq, Eq, PartialOrd, Ord};
123 pub use core::cmp::Ordering::{Less, Equal, Greater};
124 pub use core::iter::range;
125 pub use core::iter::{FromIterator, Extend, IteratorExt};
126 pub use core::iter::{Iterator, DoubleEndedIterator, RandomAccessIterator};
127 pub use core::iter::{ExactSizeIterator};
128 pub use core::marker::{Copy, Send, Sized, Sync};
129 pub use core::mem::drop;
130 pub use core::ops::{Drop, Fn, FnMut, FnOnce};
131 pub use core::option::Option;
132 pub use core::option::Option::{Some, None};
133 pub use core::ptr::PtrExt;
134 pub use core::result::Result;
135 pub use core::result::Result::{Ok, Err};
137 // in core and collections (may differ).
138 pub use slice::{AsSlice, SliceExt};
139 pub use str::{Str, StrExt};
141 // from other crates.
142 pub use alloc::boxed::Box;
143 pub use unicode::char::CharExt;
146 pub use slice::SliceConcatExt;
147 pub use string::{String, ToString};
151 /// An endpoint of a range of keys.
153 /// An inclusive bound.
155 /// An exclusive bound.
157 /// An infinite endpoint. Indicates that there is no bound in this direction.