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.
13 The standard module imported by default into all Rust modules
15 Many programming languages have a 'prelude': a particular subset of the
16 libraries that come with the language. Every program imports the prelude by
17 default. The prelude imports various core parts of the library that are
18 generally useful to many Rust programs.
22 // Reexported core operators
23 pub use kinds::{Pod, Send, Sized, Share};
24 pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not};
25 pub use ops::{BitAnd, BitOr, BitXor};
26 pub use ops::{Drop, Deref, DerefMut};
27 pub use ops::{Shl, Shr, Index};
28 pub use option::{Option, Some, None};
29 pub use result::{Result, Ok, Err};
31 // Reexported functions
32 pub use from_str::from_str;
36 // Reexported types and traits
38 pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr, IntoBytes};
39 pub use c_str::ToCStr;
42 pub use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater, Equiv};
43 pub use container::{Container, Mutable, Map, MutableMap, Set, MutableSet};
44 pub use iter::{FromIterator, Extendable};
45 pub use iter::{Iterator, DoubleEndedIterator, RandomAccessIterator, CloneableIterator};
46 pub use iter::{OrdIterator, MutableDoubleEndedIterator, ExactSize};
47 pub use num::{Num, NumCast, CheckedAdd, CheckedSub, CheckedMul};
48 pub use num::{Signed, Unsigned, Round};
49 pub use num::{Primitive, Int, Float, ToPrimitive, FromPrimitive};
50 pub use path::{GenericPath, Path, PosixPath, WindowsPath};
52 pub use io::{Buffer, Writer, Reader, Seek};
53 pub use str::{Str, StrVector, StrSlice, OwnedStr, IntoMaybeOwned};
54 pub use to_str::{ToStr, IntoStr};
55 pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4};
56 pub use tuple::{Tuple5, Tuple6, Tuple7, Tuple8};
57 pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12};
58 pub use slice::{ImmutableEqVector, ImmutableTotalOrdVector, ImmutableCloneableVector};
59 pub use slice::{OwnedVector, OwnedCloneableVector, OwnedEqVector};
60 pub use slice::{MutableVector, MutableTotalOrdVector};
61 pub use slice::{Vector, VectorVector, CloneableVector, ImmutableVector};
64 // Reexported runtime types
65 pub use comm::{channel, Sender, Receiver};