1 // Copyright 2013 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.
11 //! The Rust prelude. Imported into every module by default.
13 /* Reexported core operators */
15 pub use either::{Either, Left, Right};
16 pub use kinds::{Const, Copy, Owned, Durable};
18 pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not};
20 pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not};
21 pub use ops::{BitAnd, BitOr, BitXor};
23 pub use ops::{Shl, Shr, Index};
24 pub use option::{Option, Some, None};
25 pub use result::{Result, Ok, Err};
27 /* Reexported functions */
29 pub use io::{print, println};
31 /* Reexported types and traits */
34 pub use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
35 pub use container::{Container, Mutable, Map, Set};
37 pub use old_iter::{BaseIter, ReverseIter, MutableIter, ExtendedIter, EqIter};
38 pub use old_iter::{CopyableIter, CopyableOrderedIter, CopyableNonstrictIter};
39 pub use old_iter::{ExtendedMutableIter};
41 pub use num::{Num, NumCast};
42 pub use num::{Orderable, Signed, Unsigned, Round};
43 pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
44 pub use num::{Integer, Fractional, Real, RealExt};
45 pub use num::{Bitwise, BitCount, Bounded};
46 pub use num::{Primitive, Int, Float};
47 pub use path::GenericPath;
49 pub use path::PosixPath;
50 pub use path::WindowsPath;
52 pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
53 pub use str::{StrSlice, OwnedStr};
54 pub use to_bytes::IterBytes;
55 pub use to_str::{ToStr, ToStrConsume};
56 pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
57 pub use vec::{CopyableVector, ImmutableVector};
58 pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
59 pub use vec::{OwnedVector, OwnedCopyableVector, MutableVector};
60 pub use io::{Reader, ReaderUtil, Writer, WriterUtil};
62 /* Reexported runtime types */
63 pub use comm::{stream, Port, Chan, GenericChan, GenericSmartChan, GenericPort, Peekable};
66 /* Reexported modules */