]> git.lizzy.rs Git - rust.git/blob - src/libcore/prelude.rs
Revert rename of Div to Quot
[rust.git] / src / libcore / prelude.rs
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.
4 //
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.
10
11 //! The Rust prelude. Imported into every module by default.
12
13 /* Reexported core operators */
14
15 pub use either::{Either, Left, Right};
16 pub use kinds::{Const, Copy, Owned, Durable};
17 #[cfg(stage0)]
18 pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, Not};
19 #[cfg(not(stage0))]
20 pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not};
21 pub use ops::{BitAnd, BitOr, BitXor};
22 pub use ops::{Drop};
23 pub use ops::{Shl, Shr, Index};
24 pub use option::{Option, Some, None};
25 pub use result::{Result, Ok, Err};
26
27 /* Reexported functions */
28
29 pub use io::{print, println};
30
31 /* Reexported types and traits */
32
33 pub use clone::Clone;
34 pub use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater};
35 pub use container::{Container, Mutable, Map, Set};
36 pub use hash::Hash;
37 pub use old_iter::{BaseIter, ReverseIter, MutableIter, ExtendedIter, EqIter};
38 pub use old_iter::{CopyableIter, CopyableOrderedIter, CopyableNonstrictIter};
39 pub use old_iter::{ExtendedMutableIter};
40 pub use iter::Times;
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;
48 pub use path::Path;
49 pub use path::PosixPath;
50 pub use path::WindowsPath;
51 pub use ptr::Ptr;
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};
61
62 /* Reexported runtime types */
63 pub use comm::{stream, Port, Chan, GenericChan, GenericSmartChan, GenericPort, Peekable};
64 pub use task::spawn;
65
66 /* Reexported modules */
67
68 pub use at_vec;
69 pub use bool;
70 pub use cast;
71 pub use char;
72 pub use cmp;
73 pub use either;
74 pub use f32;
75 pub use f64;
76 pub use float;
77 pub use i16;
78 pub use i32;
79 pub use i64;
80 pub use i8;
81 pub use int;
82 pub use io;
83 pub use iter;
84 pub use old_iter;
85 pub use libc;
86 pub use num;
87 pub use ops;
88 pub use option;
89 pub use os;
90 pub use path;
91 pub use comm;
92 pub use unstable;
93 pub use ptr;
94 pub use rand;
95 pub use result;
96 pub use str;
97 pub use sys;
98 pub use task;
99 pub use to_str;
100 pub use u16;
101 pub use u32;
102 pub use u64;
103 pub use u8;
104 pub use uint;
105 pub use vec;