2011-12-20 12:29:59 -08:00
|
|
|
// Top-level, visible-everywhere definitions.
|
|
|
|
|
2012-03-02 17:20:00 -08:00
|
|
|
// Export various ubiquitous types, constructors, methods.
|
2011-12-20 12:29:59 -08:00
|
|
|
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use option::{Some, None};
|
|
|
|
pub use Option = option::Option;
|
|
|
|
pub use result::{Result, Ok, Err};
|
2012-08-28 14:49:22 -07:00
|
|
|
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use Path = path::Path;
|
|
|
|
pub use GenericPath = path::GenericPath;
|
|
|
|
pub use WindowsPath = path::WindowsPath;
|
|
|
|
pub use PosixPath = path::PosixPath;
|
2012-08-24 15:28:43 -07:00
|
|
|
|
2012-10-07 16:01:01 -07:00
|
|
|
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
|
2012-10-15 23:53:16 +03:00
|
|
|
pub use str::{StrSlice, Trimmable};
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use vec::{ConstVector, CopyableVector, ImmutableVector};
|
|
|
|
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
|
|
|
|
pub use vec::{MutableVector, MutableCopyableVector};
|
|
|
|
pub use iter::{BaseIter, ExtendedIter, EqIter, CopyableIter};
|
|
|
|
pub use iter::{CopyableOrderedIter, Times, TimesIx};
|
|
|
|
pub use num::Num;
|
|
|
|
pub use ptr::Ptr;
|
|
|
|
pub use to_str::ToStr;
|
2012-07-28 14:13:08 -07:00
|
|
|
|
2012-07-25 18:36:18 -07:00
|
|
|
// The following exports are the core operators and kinds
|
2012-07-28 14:13:08 -07:00
|
|
|
// The compiler has special knowlege of these so we must not duplicate them
|
|
|
|
// when compiling for testing
|
|
|
|
#[cfg(notest)]
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use ops::{Const, Copy, Send, Owned};
|
2012-07-28 14:13:08 -07:00
|
|
|
#[cfg(notest)]
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor};
|
2012-07-28 14:13:08 -07:00
|
|
|
#[cfg(notest)]
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use ops::{Shl, Shr, Index};
|
2011-12-20 12:29:59 -08:00
|
|
|
|
2012-07-28 16:05:38 -07:00
|
|
|
#[cfg(test)]
|
2012-10-12 16:41:25 -07:00
|
|
|
extern mod coreops(name = "core", vers = "0.5");
|
2012-07-28 16:05:38 -07:00
|
|
|
|
|
|
|
#[cfg(test)]
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use coreops::ops::{Const, Copy, Send, Owned};
|
|
|
|
#[cfg(test)]
|
|
|
|
pub use coreops::ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr};
|
2012-07-28 16:05:38 -07:00
|
|
|
#[cfg(test)]
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use coreops::ops::{BitXor};
|
2012-07-28 16:05:38 -07:00
|
|
|
#[cfg(test)]
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use coreops::ops::{Shl, Shr, Index};
|
2012-07-28 16:05:38 -07:00
|
|
|
|
|
|
|
|
2011-12-20 12:29:59 -08:00
|
|
|
// Export the log levels as global constants. Higher levels mean
|
|
|
|
// more-verbosity. Error is the bottom level, default logging level is
|
|
|
|
// warn-and-below.
|
|
|
|
|
2012-07-04 22:53:12 +01:00
|
|
|
/// The error log level
|
2012-10-03 19:24:06 -07:00
|
|
|
pub const error : u32 = 0_u32;
|
2012-07-04 22:53:12 +01:00
|
|
|
/// The warning log level
|
2012-10-03 19:24:06 -07:00
|
|
|
pub const warn : u32 = 1_u32;
|
2012-07-04 22:53:12 +01:00
|
|
|
/// The info log level
|
2012-10-03 19:24:06 -07:00
|
|
|
pub const info : u32 = 2_u32;
|
2012-07-04 22:53:12 +01:00
|
|
|
/// The debug log level
|
2012-10-03 19:24:06 -07:00
|
|
|
pub const debug : u32 = 3_u32;
|
2011-12-22 14:42:52 -08:00
|
|
|
|
|
|
|
// A curious inner-module that's not exported that contains the binding
|
|
|
|
// 'core' so that macro-expanded references to core::error and such
|
|
|
|
// can be resolved within libcore.
|
2012-09-19 16:52:32 -07:00
|
|
|
#[doc(hidden)] // FIXME #3538
|
2011-12-22 14:42:52 -08:00
|
|
|
mod core {
|
2012-10-03 19:24:06 -07:00
|
|
|
pub const error : u32 = 0_u32;
|
|
|
|
pub const warn : u32 = 1_u32;
|
|
|
|
pub const info : u32 = 2_u32;
|
|
|
|
pub const debug : u32 = 3_u32;
|
2012-01-17 16:45:22 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Similar to above. Some magic to make core testable.
|
|
|
|
#[cfg(test)]
|
|
|
|
mod std {
|
2012-10-12 16:41:25 -07:00
|
|
|
extern mod std(vers = "0.5");
|
2012-10-03 19:24:06 -07:00
|
|
|
pub use std::test;
|
2012-01-20 11:12:03 -05:00
|
|
|
}
|