Removed Unnecessary comments and white spaces #4386
This commit is contained in:
parent
0ada7c7ffe
commit
ad465441ba
111 changed files with 221 additions and 534 deletions
|
@ -50,7 +50,6 @@ use std::borrow;
|
||||||
|
|
||||||
/// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
|
/// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
|
||||||
pub struct Condvar<'self> {
|
pub struct Condvar<'self> {
|
||||||
// all were already priv
|
|
||||||
priv is_mutex: bool,
|
priv is_mutex: bool,
|
||||||
priv failed: &'self mut bool,
|
priv failed: &'self mut bool,
|
||||||
priv cond: &'self sync::Condvar<'self>
|
priv cond: &'self sync::Condvar<'self>
|
||||||
|
@ -109,7 +108,6 @@ impl<'self> Condvar<'self> {
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/// An atomically reference counted wrapper for shared immutable state.
|
/// An atomically reference counted wrapper for shared immutable state.
|
||||||
// all were already priv
|
|
||||||
pub struct Arc<T> { priv x: UnsafeArc<T> }
|
pub struct Arc<T> { priv x: UnsafeArc<T> }
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,7 +162,6 @@ struct MutexArcInner<T> { priv lock: Mutex, priv failed: bool, priv data: T }
|
||||||
|
|
||||||
/// An Arc with mutable data protected by a blocking mutex.
|
/// An Arc with mutable data protected by a blocking mutex.
|
||||||
#[no_freeze]
|
#[no_freeze]
|
||||||
//All were already priv
|
|
||||||
pub struct MutexArc<T> { priv x: UnsafeArc<MutexArcInner<T>> }
|
pub struct MutexArc<T> { priv x: UnsafeArc<MutexArcInner<T>> }
|
||||||
|
|
||||||
|
|
||||||
|
@ -347,7 +344,6 @@ struct RWArcInner<T> { priv lock: RWLock, priv failed: bool, priv data: T }
|
||||||
*/
|
*/
|
||||||
#[no_freeze]
|
#[no_freeze]
|
||||||
pub struct RWArc<T> {
|
pub struct RWArc<T> {
|
||||||
// all were already priv
|
|
||||||
priv x: UnsafeArc<RWArcInner<T>>,
|
priv x: UnsafeArc<RWArcInner<T>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,7 +522,6 @@ fn borrow_rwlock<T:Freeze + Send>(state: *mut RWArcInner<T>) -> *RWLock {
|
||||||
/// The "write permission" token used for RWArc.write_downgrade().
|
/// The "write permission" token used for RWArc.write_downgrade().
|
||||||
pub struct RWWriteMode<'self, T> {
|
pub struct RWWriteMode<'self, T> {
|
||||||
|
|
||||||
/// reedlepee added priv in all the feilds below
|
|
||||||
priv data: &'self mut T,
|
priv data: &'self mut T,
|
||||||
priv token: sync::RWLockWriteMode<'self>,
|
priv token: sync::RWLockWriteMode<'self>,
|
||||||
priv poison: PoisonOnFail,
|
priv poison: PoisonOnFail,
|
||||||
|
@ -534,7 +529,6 @@ pub struct RWWriteMode<'self, T> {
|
||||||
|
|
||||||
/// The "read permission" token used for RWArc.write_downgrade().
|
/// The "read permission" token used for RWArc.write_downgrade().
|
||||||
pub struct RWReadMode<'self, T> {
|
pub struct RWReadMode<'self, T> {
|
||||||
/// reedlepee added priv in all the feilds below
|
|
||||||
priv data: &'self T,
|
priv data: &'self T,
|
||||||
priv token: sync::RWLockReadMode<'self>,
|
priv token: sync::RWLockReadMode<'self>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,6 @@ pub struct Arena {
|
||||||
// The head is separated out from the list as a unbenchmarked
|
// The head is separated out from the list as a unbenchmarked
|
||||||
// microoptimization, to avoid needing to case on the list to
|
// microoptimization, to avoid needing to case on the list to
|
||||||
// access the head.
|
// access the head.
|
||||||
/// no change by reedlepee all were already priv
|
|
||||||
priv head: Chunk,
|
priv head: Chunk,
|
||||||
priv pod_head: Chunk,
|
priv pod_head: Chunk,
|
||||||
priv chunks: @mut MutList<Chunk>,
|
priv chunks: @mut MutList<Chunk>,
|
||||||
|
|
|
@ -21,7 +21,6 @@ pub enum CharacterSet {
|
||||||
|
|
||||||
/// Contains configuration parameters for `to_base64`.
|
/// Contains configuration parameters for `to_base64`.
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
/// all were made priv by reedlepee
|
|
||||||
/// Character set to use
|
/// Character set to use
|
||||||
priv char_set: CharacterSet,
|
priv char_set: CharacterSet,
|
||||||
/// True to pad output with `=` characters
|
/// True to pad output with `=` characters
|
||||||
|
|
|
@ -225,7 +225,6 @@ enum Op {Union, Intersect, Assign, Difference}
|
||||||
/// The bitvector type
|
/// The bitvector type
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct Bitv {
|
pub struct Bitv {
|
||||||
/// all were made priv by reedlepee
|
|
||||||
/// Internal representation of the bit vector (small or large)
|
/// Internal representation of the bit vector (small or large)
|
||||||
priv rep: BitvVariant,
|
priv rep: BitvVariant,
|
||||||
/// The number of valid bits in the internal representation
|
/// The number of valid bits in the internal representation
|
||||||
|
@ -574,7 +573,6 @@ fn iterate_bits(base: uint, bits: uint, f: &fn(uint) -> bool) -> bool {
|
||||||
|
|
||||||
/// An iterator for `Bitv`.
|
/// An iterator for `Bitv`.
|
||||||
pub struct BitvIterator<'self> {
|
pub struct BitvIterator<'self> {
|
||||||
/// all were already priv
|
|
||||||
priv bitv: &'self Bitv,
|
priv bitv: &'self Bitv,
|
||||||
priv next_idx: uint,
|
priv next_idx: uint,
|
||||||
priv end_idx: uint,
|
priv end_idx: uint,
|
||||||
|
@ -636,7 +634,6 @@ impl<'self> RandomAccessIterator<bool> for BitvIterator<'self> {
|
||||||
/// as a `uint`.
|
/// as a `uint`.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct BitvSet {
|
pub struct BitvSet {
|
||||||
// all were already priv!!
|
|
||||||
priv size: uint,
|
priv size: uint,
|
||||||
|
|
||||||
// In theory this is a `Bitv` instead of always a `BigBitv`, but knowing that
|
// In theory this is a `Bitv` instead of always a `BigBitv`, but knowing that
|
||||||
|
@ -903,7 +900,6 @@ impl BitvSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct BitvSetIterator<'self> {
|
pub struct BitvSetIterator<'self> {
|
||||||
// all were already priv
|
|
||||||
priv set: &'self BitvSet,
|
priv set: &'self BitvSet,
|
||||||
priv next_idx: uint
|
priv next_idx: uint
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ use std::util;
|
||||||
* The type representing a foreign chunk of memory
|
* The type representing a foreign chunk of memory
|
||||||
*/
|
*/
|
||||||
pub struct CVec<T> {
|
pub struct CVec<T> {
|
||||||
/// No change all were allready priv!!
|
|
||||||
priv base: *mut T,
|
priv base: *mut T,
|
||||||
priv len: uint,
|
priv len: uint,
|
||||||
priv rsrc: @DtorRes,
|
priv rsrc: @DtorRes,
|
||||||
|
|
|
@ -23,7 +23,6 @@ use std::comm;
|
||||||
|
|
||||||
/// An extension of `pipes::stream` that allows both sending and receiving.
|
/// An extension of `pipes::stream` that allows both sending and receiving.
|
||||||
pub struct DuplexStream<T, U> {
|
pub struct DuplexStream<T, U> {
|
||||||
// all were already priv
|
|
||||||
priv chan: Chan<T>,
|
priv chan: Chan<T>,
|
||||||
priv port: Port<U>,
|
priv port: Port<U>,
|
||||||
}
|
}
|
||||||
|
@ -95,7 +94,6 @@ pub fn DuplexStream<T:Send,U:Send>()
|
||||||
// all were already priv
|
// all were already priv
|
||||||
pub struct SyncChan<T> { priv duplex_stream: DuplexStream<T, ()> }
|
pub struct SyncChan<T> { priv duplex_stream: DuplexStream<T, ()> }
|
||||||
/// An extension of `pipes::stream` that acknowledges each message received.
|
/// An extension of `pipes::stream` that acknowledges each message received.
|
||||||
// all were already priv
|
|
||||||
pub struct SyncPort<T> { priv duplex_stream: DuplexStream<(), T> }
|
pub struct SyncPort<T> { priv duplex_stream: DuplexStream<(), T> }
|
||||||
|
|
||||||
impl<T: Send> GenericChan<T> for SyncChan<T> {
|
impl<T: Send> GenericChan<T> for SyncChan<T> {
|
||||||
|
|
|
@ -284,7 +284,6 @@ macro_rules! impl_fixed_buffer( ($name:ident, $size:expr) => (
|
||||||
|
|
||||||
/// A fixed size buffer of 64 bytes useful for cryptographic operations.
|
/// A fixed size buffer of 64 bytes useful for cryptographic operations.
|
||||||
pub struct FixedBuffer64 {
|
pub struct FixedBuffer64 {
|
||||||
// already priv
|
|
||||||
priv buffer: [u8, ..64],
|
priv buffer: [u8, ..64],
|
||||||
priv buffer_idx: uint,
|
priv buffer_idx: uint,
|
||||||
}
|
}
|
||||||
|
@ -303,7 +302,6 @@ impl_fixed_buffer!(FixedBuffer64, 64)
|
||||||
|
|
||||||
/// A fixed size buffer of 128 bytes useful for cryptographic operations.
|
/// A fixed size buffer of 128 bytes useful for cryptographic operations.
|
||||||
pub struct FixedBuffer128 {
|
pub struct FixedBuffer128 {
|
||||||
// already priv
|
|
||||||
priv buffer: [u8, ..128],
|
priv buffer: [u8, ..128],
|
||||||
priv buffer_idx: uint,
|
priv buffer_idx: uint,
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,6 @@ static C4: [u32, ..16] = [
|
||||||
|
|
||||||
/// The MD5 Digest algorithm
|
/// The MD5 Digest algorithm
|
||||||
pub struct Md5 {
|
pub struct Md5 {
|
||||||
// already priv
|
|
||||||
priv length_bytes: u64,
|
priv length_bytes: u64,
|
||||||
priv buffer: FixedBuffer64,
|
priv buffer: FixedBuffer64,
|
||||||
priv state: Md5State,
|
priv state: Md5State,
|
||||||
|
|
|
@ -43,7 +43,6 @@ static K3: u32 = 0xCA62C1D6u32;
|
||||||
|
|
||||||
/// Structure representing the state of a Sha1 computation
|
/// Structure representing the state of a Sha1 computation
|
||||||
pub struct Sha1 {
|
pub struct Sha1 {
|
||||||
// already priv
|
|
||||||
priv h: [u32, ..DIGEST_BUF_LEN],
|
priv h: [u32, ..DIGEST_BUF_LEN],
|
||||||
priv length_bits: u64,
|
priv length_bits: u64,
|
||||||
priv buffer: FixedBuffer64,
|
priv buffer: FixedBuffer64,
|
||||||
|
|
|
@ -234,7 +234,6 @@ impl Engine512 {
|
||||||
|
|
||||||
/// The SHA-512 hash algorithm
|
/// The SHA-512 hash algorithm
|
||||||
pub struct Sha512 {
|
pub struct Sha512 {
|
||||||
// already priv
|
|
||||||
priv engine: Engine512
|
priv engine: Engine512
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,7 +287,6 @@ static H512: [u64, ..8] = [
|
||||||
|
|
||||||
/// The SHA-384 hash algorithm
|
/// The SHA-384 hash algorithm
|
||||||
pub struct Sha384 {
|
pub struct Sha384 {
|
||||||
// already priv
|
|
||||||
priv engine: Engine512
|
priv engine: Engine512
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +338,6 @@ static H384: [u64, ..8] = [
|
||||||
|
|
||||||
/// The SHA-512 hash algorithm with digest truncated to 256 bits
|
/// The SHA-512 hash algorithm with digest truncated to 256 bits
|
||||||
pub struct Sha512Trunc256 {
|
pub struct Sha512Trunc256 {
|
||||||
// already priv
|
|
||||||
priv engine: Engine512
|
priv engine: Engine512
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,7 +387,6 @@ static H512_TRUNC_256: [u64, ..8] = [
|
||||||
|
|
||||||
/// The SHA-512 hash algorithm with digest truncated to 224 bits
|
/// The SHA-512 hash algorithm with digest truncated to 224 bits
|
||||||
pub struct Sha512Trunc224 {
|
pub struct Sha512Trunc224 {
|
||||||
// already priv
|
|
||||||
priv engine: Engine512
|
priv engine: Engine512
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -647,7 +643,6 @@ impl Engine256 {
|
||||||
|
|
||||||
/// The SHA-256 hash algorithm
|
/// The SHA-256 hash algorithm
|
||||||
pub struct Sha256 {
|
pub struct Sha256 {
|
||||||
// already priv
|
|
||||||
priv engine: Engine256
|
priv engine: Engine256
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -701,7 +696,6 @@ static H256: [u32, ..8] = [
|
||||||
|
|
||||||
/// The SHA-224 hash algorithm
|
/// The SHA-224 hash algorithm
|
||||||
pub struct Sha224 {
|
pub struct Sha224 {
|
||||||
// already priv
|
|
||||||
priv engine: Engine256
|
priv engine: Engine256
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ use container::Deque;
|
||||||
|
|
||||||
/// A doubly-linked list.
|
/// A doubly-linked list.
|
||||||
pub struct DList<T> {
|
pub struct DList<T> {
|
||||||
// all were already priv
|
|
||||||
priv length: uint,
|
priv length: uint,
|
||||||
priv list_head: Link<T>,
|
priv list_head: Link<T>,
|
||||||
priv list_tail: Rawlink<Node<T>>,
|
priv list_tail: Rawlink<Node<T>>,
|
||||||
|
@ -50,7 +49,6 @@ struct Node<T> {
|
||||||
/// Double-ended DList iterator
|
/// Double-ended DList iterator
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct DListIterator<'self, T> {
|
pub struct DListIterator<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv head: &'self Link<T>,
|
priv head: &'self Link<T>,
|
||||||
priv tail: Rawlink<Node<T>>,
|
priv tail: Rawlink<Node<T>>,
|
||||||
priv nelem: uint,
|
priv nelem: uint,
|
||||||
|
@ -58,7 +56,6 @@ pub struct DListIterator<'self, T> {
|
||||||
|
|
||||||
/// Double-ended mutable DList iterator
|
/// Double-ended mutable DList iterator
|
||||||
pub struct MutDListIterator<'self, T> {
|
pub struct MutDListIterator<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv list: &'self mut DList<T>,
|
priv list: &'self mut DList<T>,
|
||||||
priv head: Rawlink<Node<T>>,
|
priv head: Rawlink<Node<T>>,
|
||||||
priv tail: Rawlink<Node<T>>,
|
priv tail: Rawlink<Node<T>>,
|
||||||
|
@ -68,7 +65,6 @@ pub struct MutDListIterator<'self, T> {
|
||||||
/// DList consuming iterator
|
/// DList consuming iterator
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct MoveIterator<T> {
|
pub struct MoveIterator<T> {
|
||||||
// all were already priv
|
|
||||||
priv list: DList<T>
|
priv list: DList<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ struct EbmlState {
|
||||||
|
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct Doc {
|
pub struct Doc {
|
||||||
// all these should be public
|
|
||||||
data: @~[u8],
|
data: @~[u8],
|
||||||
start: uint,
|
start: uint,
|
||||||
end: uint,
|
end: uint,
|
||||||
|
@ -51,9 +50,7 @@ impl Doc {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TaggedDoc {
|
pub struct TaggedDoc {
|
||||||
// was made privv by reedlepee
|
|
||||||
priv tag: uint,
|
priv tag: uint,
|
||||||
// should be public
|
|
||||||
doc: Doc,
|
doc: Doc,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,7 +284,6 @@ pub mod reader {
|
||||||
pub fn doc_as_i64(d: Doc) -> i64 { doc_as_u64(d) as i64 }
|
pub fn doc_as_i64(d: Doc) -> i64 { doc_as_u64(d) as i64 }
|
||||||
|
|
||||||
pub struct Decoder {
|
pub struct Decoder {
|
||||||
// all were already priv
|
|
||||||
priv parent: Doc,
|
priv parent: Doc,
|
||||||
priv pos: uint,
|
priv pos: uint,
|
||||||
}
|
}
|
||||||
|
@ -622,9 +618,7 @@ pub mod writer {
|
||||||
|
|
||||||
// ebml writing
|
// ebml writing
|
||||||
pub struct Encoder {
|
pub struct Encoder {
|
||||||
/// should be public!!
|
|
||||||
writer: @io::Writer,
|
writer: @io::Writer,
|
||||||
/// this was already privv!!
|
|
||||||
priv size_positions: ~[uint],
|
priv size_positions: ~[uint],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
pub struct EnumSet<E> {
|
pub struct EnumSet<E> {
|
||||||
// We must maintain the invariant that no bits are set
|
// We must maintain the invariant that no bits are set
|
||||||
// for which no variant exists
|
// for which no variant exists
|
||||||
// all were already priv
|
|
||||||
priv bits: uint
|
priv bits: uint
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +100,6 @@ impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
|
||||||
|
|
||||||
/// An iterator over an EnumSet
|
/// An iterator over an EnumSet
|
||||||
pub struct EnumSetIterator<E> {
|
pub struct EnumSetIterator<E> {
|
||||||
// all were already priv
|
|
||||||
priv index: uint,
|
priv index: uint,
|
||||||
priv bits: uint,
|
priv bits: uint,
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,6 @@ file is `stdin`.
|
||||||
*/
|
*/
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct FileInputState {
|
pub struct FileInputState {
|
||||||
// all were priv made by reedlepee
|
|
||||||
priv current_path: Option<Path>,
|
priv current_path: Option<Path>,
|
||||||
priv line_num: uint,
|
priv line_num: uint,
|
||||||
priv line_num_file: uint
|
priv line_num_file: uint
|
||||||
|
@ -156,7 +155,6 @@ struct FileInput_ {
|
||||||
// "self.fi" -> "self." and renaming FileInput_. Documentation above
|
// "self.fi" -> "self." and renaming FileInput_. Documentation above
|
||||||
// will likely have to be updated to use `let mut in = ...`.
|
// will likely have to be updated to use `let mut in = ...`.
|
||||||
pub struct FileInput {
|
pub struct FileInput {
|
||||||
/// all were made priv by reedlepee
|
|
||||||
priv fi: @mut FileInput_
|
priv fi: @mut FileInput_
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@ use std::util::replace;
|
||||||
|
|
||||||
/// A type encapsulating the result of a computation which may not be complete
|
/// A type encapsulating the result of a computation which may not be complete
|
||||||
pub struct Future<A> {
|
pub struct Future<A> {
|
||||||
// all were already privv!!
|
|
||||||
priv state: FutureState<A>,
|
priv state: FutureState<A>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,8 +112,6 @@ pub enum Occur {
|
||||||
/// A description of a possible option.
|
/// A description of a possible option.
|
||||||
#[deriving(Clone, Eq)]
|
#[deriving(Clone, Eq)]
|
||||||
pub struct Opt {
|
pub struct Opt {
|
||||||
|
|
||||||
/// reedlepee added priv infront of them!!
|
|
||||||
/// Name of the option
|
/// Name of the option
|
||||||
name: Name,
|
name: Name,
|
||||||
/// Wheter it has an argument... should be public!!
|
/// Wheter it has an argument... should be public!!
|
||||||
|
@ -136,7 +134,6 @@ enum Optval {
|
||||||
#[deriving(Clone, Eq)]
|
#[deriving(Clone, Eq)]
|
||||||
pub struct Matches {
|
pub struct Matches {
|
||||||
|
|
||||||
/// reedlepee added priv infront of all
|
|
||||||
/// Options that matched
|
/// Options that matched
|
||||||
priv opts: ~[Opt],
|
priv opts: ~[Opt],
|
||||||
/// Values of the Options that matched
|
/// Values of the Options that matched
|
||||||
|
|
|
@ -33,7 +33,6 @@ use sort;
|
||||||
* pattern - see the `glob` function for more details.
|
* pattern - see the `glob` function for more details.
|
||||||
*/
|
*/
|
||||||
pub struct GlobIterator {
|
pub struct GlobIterator {
|
||||||
/// no change by reedlepee all were priv already!!
|
|
||||||
priv root: Path,
|
priv root: Path,
|
||||||
priv dir_patterns: ~[Pattern],
|
priv dir_patterns: ~[Pattern],
|
||||||
priv options: MatchOptions,
|
priv options: MatchOptions,
|
||||||
|
@ -157,7 +156,6 @@ fn list_dir_sorted(path: &Path) -> ~[Path] {
|
||||||
*/
|
*/
|
||||||
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
|
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
|
||||||
pub struct Pattern {
|
pub struct Pattern {
|
||||||
// already priv
|
|
||||||
priv tokens: ~[PatternToken]
|
priv tokens: ~[PatternToken]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,7 +474,6 @@ fn chars_eq(a: char, b: char, case_sensitive: bool) -> bool {
|
||||||
*/
|
*/
|
||||||
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
|
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
|
||||||
pub struct MatchOptions {
|
pub struct MatchOptions {
|
||||||
/// all were made priv by reedlepee
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether or not patterns should be matched in a case-sensitive manner. This
|
* Whether or not patterns should be matched in a case-sensitive manner. This
|
||||||
|
|
|
@ -16,7 +16,6 @@ use std::cast;
|
||||||
|
|
||||||
/// An implementation of the io::Reader interface which reads a buffer of bytes
|
/// An implementation of the io::Reader interface which reads a buffer of bytes
|
||||||
pub struct BufReader {
|
pub struct BufReader {
|
||||||
// all were made priv by reedlepee
|
|
||||||
/// The buffer of bytes to read
|
/// The buffer of bytes to read
|
||||||
priv buf: ~[u8],
|
priv buf: ~[u8],
|
||||||
/// The current position in the buffer of bytes
|
/// The current position in the buffer of bytes
|
||||||
|
|
|
@ -48,7 +48,6 @@ pub type Object = TreeMap<~str, Json>;
|
||||||
/// If an error occurs while parsing some JSON, this is the structure which is
|
/// If an error occurs while parsing some JSON, this is the structure which is
|
||||||
/// returned
|
/// returned
|
||||||
pub struct Error {
|
pub struct Error {
|
||||||
// all were made privv by reedlepee
|
|
||||||
/// The line number at which the error occurred
|
/// The line number at which the error occurred
|
||||||
priv line: uint,
|
priv line: uint,
|
||||||
/// The column number at which the error occurred
|
/// The column number at which the error occurred
|
||||||
|
@ -87,7 +86,6 @@ fn spaces(n: uint) -> ~str {
|
||||||
|
|
||||||
/// A structure for implementing serialization to JSON.
|
/// A structure for implementing serialization to JSON.
|
||||||
pub struct Encoder {
|
pub struct Encoder {
|
||||||
// all were already priv
|
|
||||||
priv wr: @io::Writer,
|
priv wr: @io::Writer,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +243,6 @@ impl serialize::Encoder for Encoder {
|
||||||
/// Another encoder for JSON, but prints out human-readable JSON instead of
|
/// Another encoder for JSON, but prints out human-readable JSON instead of
|
||||||
/// compact data
|
/// compact data
|
||||||
pub struct PrettyEncoder {
|
pub struct PrettyEncoder {
|
||||||
// all were already priv
|
|
||||||
priv wr: @io::Writer,
|
priv wr: @io::Writer,
|
||||||
priv indent: uint,
|
priv indent: uint,
|
||||||
}
|
}
|
||||||
|
@ -482,7 +479,6 @@ impl Json{
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Parser<T> {
|
pub struct Parser<T> {
|
||||||
// all were already priv
|
|
||||||
priv rdr: ~T,
|
priv rdr: ~T,
|
||||||
priv ch: char,
|
priv ch: char,
|
||||||
priv line: uint,
|
priv line: uint,
|
||||||
|
@ -872,7 +868,6 @@ pub fn from_str(s: &str) -> Result<Json, Error> {
|
||||||
|
|
||||||
/// A structure to decode JSON to values in rust.
|
/// A structure to decode JSON to values in rust.
|
||||||
pub struct Decoder {
|
pub struct Decoder {
|
||||||
// all were already priv
|
|
||||||
priv stack: ~[Json],
|
priv stack: ~[Json],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,6 @@ A `BigUint`-typed value `BigUint { data: @[a, b, c] }` represents a number
|
||||||
*/
|
*/
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct BigUint {
|
pub struct BigUint {
|
||||||
// already priv
|
|
||||||
priv data: ~[BigDigit]
|
priv data: ~[BigDigit]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -894,7 +893,6 @@ impl Neg<Sign> for Sign {
|
||||||
/// A big signed integer type.
|
/// A big signed integer type.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct BigInt {
|
pub struct BigInt {
|
||||||
// already priv
|
|
||||||
priv sign: Sign,
|
priv sign: Sign,
|
||||||
priv data: BigUint
|
priv data: BigUint
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ use std::num::{Zero,One,ToStrRadix};
|
||||||
/// A complex number in Cartesian form.
|
/// A complex number in Cartesian form.
|
||||||
#[deriving(Eq,Clone)]
|
#[deriving(Eq,Clone)]
|
||||||
pub struct Cmplx<T> {
|
pub struct Cmplx<T> {
|
||||||
// all made real by reedlepee
|
|
||||||
/// Real portion of the complex number
|
/// Real portion of the complex number
|
||||||
priv re: T,
|
priv re: T,
|
||||||
/// Imaginary portion of the complex number
|
/// Imaginary portion of the complex number
|
||||||
|
|
|
@ -20,7 +20,6 @@ use super::bigint::BigInt;
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
pub struct Ratio<T> {
|
pub struct Ratio<T> {
|
||||||
// made priv by reedlepee
|
|
||||||
priv numer: T,
|
priv numer: T,
|
||||||
priv denom: T
|
priv denom: T
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ use std::vec;
|
||||||
/// A priority queue implemented with a binary heap
|
/// A priority queue implemented with a binary heap
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct PriorityQueue<T> {
|
pub struct PriorityQueue<T> {
|
||||||
// all were already priv
|
|
||||||
priv data: ~[T],
|
priv data: ~[T],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +178,6 @@ impl<T:Ord> PriorityQueue<T> {
|
||||||
|
|
||||||
/// PriorityQueue iterator
|
/// PriorityQueue iterator
|
||||||
pub struct PriorityQueueIterator <'self, T> {
|
pub struct PriorityQueueIterator <'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv iter: vec::VecIterator<'self, T>,
|
priv iter: vec::VecIterator<'self, T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ static MINIMUM_CAPACITY: uint = 2u;
|
||||||
/// RingBuf is a circular buffer that implements Deque.
|
/// RingBuf is a circular buffer that implements Deque.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct RingBuf<T> {
|
pub struct RingBuf<T> {
|
||||||
// all were already priv
|
|
||||||
priv nelts: uint,
|
priv nelts: uint,
|
||||||
priv lo: uint,
|
priv lo: uint,
|
||||||
priv elts: ~[Option<T>]
|
priv elts: ~[Option<T>]
|
||||||
|
@ -249,7 +248,6 @@ macro_rules! iterator_rev {
|
||||||
|
|
||||||
/// RingBuf iterator
|
/// RingBuf iterator
|
||||||
pub struct RingBufIterator<'self, T> {
|
pub struct RingBufIterator<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv lo: uint,
|
priv lo: uint,
|
||||||
priv index: uint,
|
priv index: uint,
|
||||||
priv rindex: uint,
|
priv rindex: uint,
|
||||||
|
@ -277,7 +275,6 @@ impl<'self, T> RandomAccessIterator<&'self T> for RingBufIterator<'self, T> {
|
||||||
|
|
||||||
/// RingBuf mutable iterator
|
/// RingBuf mutable iterator
|
||||||
pub struct RingBufMutIterator<'self, T> {
|
pub struct RingBufMutIterator<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv lo: uint,
|
priv lo: uint,
|
||||||
priv index: uint,
|
priv index: uint,
|
||||||
priv rindex: uint,
|
priv rindex: uint,
|
||||||
|
|
|
@ -70,7 +70,6 @@ impl ToStr for Identifier {
|
||||||
/// Represents a version number conforming to the semantic versioning scheme.
|
/// Represents a version number conforming to the semantic versioning scheme.
|
||||||
#[deriving(Clone, Eq)]
|
#[deriving(Clone, Eq)]
|
||||||
pub struct Version {
|
pub struct Version {
|
||||||
/// reedlepee added priv in all
|
|
||||||
/// The major version, to be incremented on incompatible changes.
|
/// The major version, to be incremented on incompatible changes.
|
||||||
priv major: uint,
|
priv major: uint,
|
||||||
/// The minor version, to be incremented when functionality is added in a
|
/// The minor version, to be incremented when functionality is added in a
|
||||||
|
|
|
@ -22,7 +22,6 @@ use std::vec;
|
||||||
|
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
pub struct SmallIntMap<T> {
|
pub struct SmallIntMap<T> {
|
||||||
/// all were already priv!!
|
|
||||||
priv v: ~[Option<T>],
|
priv v: ~[Option<T>],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +233,6 @@ macro_rules! double_ended_iterator {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct SmallIntMapIterator<'self, T> {
|
pub struct SmallIntMapIterator<'self, T> {
|
||||||
/// all were already priv!!
|
|
||||||
priv front: uint,
|
priv front: uint,
|
||||||
priv back: uint,
|
priv back: uint,
|
||||||
priv iter: VecIterator<'self, Option<T>>
|
priv iter: VecIterator<'self, Option<T>>
|
||||||
|
@ -245,7 +243,6 @@ double_ended_iterator!(impl SmallIntMapIterator -> (uint, &'self T), get_ref)
|
||||||
pub type SmallIntMapRevIterator<'self, T> = Invert<SmallIntMapIterator<'self, T>>;
|
pub type SmallIntMapRevIterator<'self, T> = Invert<SmallIntMapIterator<'self, T>>;
|
||||||
|
|
||||||
pub struct SmallIntMapMutIterator<'self, T> {
|
pub struct SmallIntMapMutIterator<'self, T> {
|
||||||
/// all were already priv!!
|
|
||||||
priv front: uint,
|
priv front: uint,
|
||||||
priv back: uint,
|
priv back: uint,
|
||||||
priv iter: VecMutIterator<'self, Option<T>>
|
priv iter: VecMutIterator<'self, Option<T>>
|
||||||
|
|
|
@ -105,7 +105,6 @@ pub trait Stats {
|
||||||
#[deriving(Clone, Eq)]
|
#[deriving(Clone, Eq)]
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
pub struct Summary {
|
pub struct Summary {
|
||||||
/// all were made privv by reedlepee
|
|
||||||
priv sum: f64,
|
priv sum: f64,
|
||||||
// public
|
// public
|
||||||
min: f64,
|
min: f64,
|
||||||
|
|
|
@ -168,7 +168,6 @@ enum ReacquireOrderLock<'self> {
|
||||||
/// A mechanism for atomic-unlock-and-deschedule blocking and signalling.
|
/// A mechanism for atomic-unlock-and-deschedule blocking and signalling.
|
||||||
pub struct Condvar<'self> {
|
pub struct Condvar<'self> {
|
||||||
|
|
||||||
// reedlepee didnot change anything they were already priv!!!
|
|
||||||
|
|
||||||
// The 'Sem' object associated with this condvar. This is the one that's
|
// The 'Sem' object associated with this condvar. This is the one that's
|
||||||
// atomically-unlocked-and-descheduled upon and reacquired during wakeup.
|
// atomically-unlocked-and-descheduled upon and reacquired during wakeup.
|
||||||
|
@ -380,7 +379,6 @@ impl Semaphore {
|
||||||
* unwinds.
|
* unwinds.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// reedlepee did not change !!
|
|
||||||
pub struct Mutex { priv sem: Sem<~[WaitQueue]> }
|
pub struct Mutex { priv sem: Sem<~[WaitQueue]> }
|
||||||
impl Clone for Mutex {
|
impl Clone for Mutex {
|
||||||
/// Create a new handle to the mutex.
|
/// Create a new handle to the mutex.
|
||||||
|
@ -448,7 +446,6 @@ struct RWLockInner {
|
||||||
* unwinds.
|
* unwinds.
|
||||||
*/
|
*/
|
||||||
pub struct RWLock {
|
pub struct RWLock {
|
||||||
// reedlepee did not change they were already priv!!
|
|
||||||
priv order_lock: Semaphore,
|
priv order_lock: Semaphore,
|
||||||
priv access_lock: Sem<~[WaitQueue]>,
|
priv access_lock: Sem<~[WaitQueue]>,
|
||||||
priv state: UnsafeArc<RWLockInner>,
|
priv state: UnsafeArc<RWLockInner>,
|
||||||
|
@ -669,11 +666,9 @@ impl RWLock {
|
||||||
|
|
||||||
/// The "write permission" token used for rwlock.write_downgrade().
|
/// The "write permission" token used for rwlock.write_downgrade().
|
||||||
|
|
||||||
// already priv
|
|
||||||
pub struct RWLockWriteMode<'self> { priv lock: &'self RWLock, priv token: NonCopyable }
|
pub struct RWLockWriteMode<'self> { priv lock: &'self RWLock, priv token: NonCopyable }
|
||||||
|
|
||||||
/// The "read permission" token used for rwlock.write_downgrade().
|
/// The "read permission" token used for rwlock.write_downgrade().
|
||||||
// already priv
|
|
||||||
pub struct RWLockReadMode<'self> { priv lock: &'self RWLock,
|
pub struct RWLockReadMode<'self> { priv lock: &'self RWLock,
|
||||||
priv token: NonCopyable }
|
priv token: NonCopyable }
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ enum Msg<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TaskPool<T> {
|
pub struct TaskPool<T> {
|
||||||
/// all were made priv by reedlepee
|
|
||||||
priv channels: ~[Chan<Msg<T>>],
|
priv channels: ~[Chan<Msg<T>>],
|
||||||
priv next_index: uint,
|
priv next_index: uint,
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ use std::rand;
|
||||||
/// A wrapper for a path to temporary directory implementing automatic
|
/// A wrapper for a path to temporary directory implementing automatic
|
||||||
/// scope-pased deletion.
|
/// scope-pased deletion.
|
||||||
pub struct TempDir {
|
pub struct TempDir {
|
||||||
// all were already priv!!
|
|
||||||
priv path: Option<Path>
|
priv path: Option<Path>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,18 +96,14 @@ fn cap_for_attr(attr: attr::Attr) -> &'static str {
|
||||||
#[cfg(not(target_os = "win32"))]
|
#[cfg(not(target_os = "win32"))]
|
||||||
pub struct Terminal {
|
pub struct Terminal {
|
||||||
|
|
||||||
// this was made priv by reedlepee
|
|
||||||
priv num_colors: u16,
|
priv num_colors: u16,
|
||||||
// These were already priv
|
|
||||||
priv out: @io::Writer,
|
priv out: @io::Writer,
|
||||||
priv ti: ~TermInfo
|
priv ti: ~TermInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "win32")]
|
#[cfg(target_os = "win32")]
|
||||||
pub struct Terminal {
|
pub struct Terminal {
|
||||||
// this was made priv by reedlepee
|
|
||||||
priv num_colors: u16,
|
priv num_colors: u16,
|
||||||
// These were already priv
|
|
||||||
priv out: @io::Writer,
|
priv out: @io::Writer,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,6 @@ pub enum Param {
|
||||||
|
|
||||||
/// Container for static and dynamic variable arrays
|
/// Container for static and dynamic variable arrays
|
||||||
pub struct Variables {
|
pub struct Variables {
|
||||||
// made priv by redlpee
|
|
||||||
/// Static variables A-Z
|
/// Static variables A-Z
|
||||||
priv sta: [Param, ..26],
|
priv sta: [Param, ..26],
|
||||||
/// Dynamic variables a-z
|
/// Dynamic variables a-z
|
||||||
|
|
|
@ -14,7 +14,6 @@ use std::hashmap::HashMap;
|
||||||
|
|
||||||
/// A parsed terminfo entry.
|
/// A parsed terminfo entry.
|
||||||
pub struct TermInfo {
|
pub struct TermInfo {
|
||||||
// made priv by redlpee
|
|
||||||
/// Names for the terminal
|
/// Names for the terminal
|
||||||
priv names: ~[~str],
|
priv names: ~[~str],
|
||||||
/// Map of capability name to boolean value
|
/// Map of capability name to boolean value
|
||||||
|
|
|
@ -102,11 +102,9 @@ impl TestFn {
|
||||||
|
|
||||||
// Structure passed to BenchFns
|
// Structure passed to BenchFns
|
||||||
pub struct BenchHarness {
|
pub struct BenchHarness {
|
||||||
// all changed to priv by reedlepee
|
|
||||||
priv iterations: u64,
|
priv iterations: u64,
|
||||||
priv ns_start: u64,
|
priv ns_start: u64,
|
||||||
priv ns_end: u64,
|
priv ns_end: u64,
|
||||||
// should be public
|
|
||||||
bytes: u64
|
bytes: u64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,27 +112,23 @@ pub struct BenchHarness {
|
||||||
// these.
|
// these.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct TestDesc {
|
pub struct TestDesc {
|
||||||
// all changed to priv by reedlepee
|
|
||||||
name: TestName,
|
name: TestName,
|
||||||
ignore: bool,
|
ignore: bool,
|
||||||
should_fail: bool
|
should_fail: bool
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TestDescAndFn {
|
pub struct TestDescAndFn {
|
||||||
// all changed to priv by reedlepee
|
|
||||||
desc: TestDesc,
|
desc: TestDesc,
|
||||||
testfn: TestFn,
|
testfn: TestFn,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Clone, Encodable, Decodable, Eq)]
|
#[deriving(Clone, Encodable, Decodable, Eq)]
|
||||||
pub struct Metric {
|
pub struct Metric {
|
||||||
// all changed to priv by reedlepee
|
|
||||||
priv value: f64,
|
priv value: f64,
|
||||||
priv noise: f64
|
priv noise: f64
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
/// not adding priv infront of this struct b/c its a tuple struct!! - reedlepee
|
|
||||||
pub struct MetricMap(TreeMap<~str,Metric>);
|
pub struct MetricMap(TreeMap<~str,Metric>);
|
||||||
|
|
||||||
impl Clone for MetricMap {
|
impl Clone for MetricMap {
|
||||||
|
@ -192,7 +186,6 @@ pub fn test_main_static(args: &[~str], tests: &[TestDescAndFn]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TestOpts {
|
pub struct TestOpts {
|
||||||
/// priv added in all by reedlepee!!
|
|
||||||
filter: Option<~str>,
|
filter: Option<~str>,
|
||||||
run_ignored: bool,
|
run_ignored: bool,
|
||||||
run_tests: bool,
|
run_tests: bool,
|
||||||
|
@ -329,7 +322,6 @@ pub fn opt_shard(maybestr: Option<~str>) -> Option<(uint,uint)> {
|
||||||
|
|
||||||
#[deriving(Clone, Eq)]
|
#[deriving(Clone, Eq)]
|
||||||
pub struct BenchSamples {
|
pub struct BenchSamples {
|
||||||
/// priv added in all by reedlepee
|
|
||||||
priv ns_iter_summ: stats::Summary,
|
priv ns_iter_summ: stats::Summary,
|
||||||
priv mb_s: uint
|
priv mb_s: uint
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ pub mod rustrt {
|
||||||
|
|
||||||
/// A record specifying a time value in seconds and nanoseconds.
|
/// A record specifying a time value in seconds and nanoseconds.
|
||||||
|
|
||||||
/// all were made priv reedlepee
|
|
||||||
|
|
||||||
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
|
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
|
||||||
pub struct Timespec { priv sec: i64, priv nsec: i32 }
|
pub struct Timespec { priv sec: i64, priv nsec: i32 }
|
||||||
|
@ -107,7 +106,6 @@ pub fn tzset() {
|
||||||
|
|
||||||
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
|
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
|
||||||
pub struct Tm {
|
pub struct Tm {
|
||||||
/// all were made priv by reedlepee
|
|
||||||
priv tm_sec: i32, // seconds after the minute ~[0-60]
|
priv tm_sec: i32, // seconds after the minute ~[0-60]
|
||||||
priv tm_min: i32, // minutes after the hour ~[0-59]
|
priv tm_min: i32, // minutes after the hour ~[0-59]
|
||||||
priv tm_hour: i32, // hours after midnight ~[0-23]
|
priv tm_hour: i32, // hours after midnight ~[0-23]
|
||||||
|
|
|
@ -36,7 +36,6 @@ use std::cmp::Ordering;
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct TreeMap<K, V> {
|
pub struct TreeMap<K, V> {
|
||||||
/// all were already priv!!
|
|
||||||
priv root: Option<~TreeNode<K, V>>,
|
priv root: Option<~TreeNode<K, V>>,
|
||||||
priv length: uint
|
priv length: uint
|
||||||
}
|
}
|
||||||
|
@ -230,7 +229,6 @@ impl<K: TotalOrd, V> TreeMap<K, V> {
|
||||||
|
|
||||||
/// Lazy forward iterator over a map
|
/// Lazy forward iterator over a map
|
||||||
pub struct TreeMapIterator<'self, K, V> {
|
pub struct TreeMapIterator<'self, K, V> {
|
||||||
// all were already priv
|
|
||||||
priv stack: ~[&'self ~TreeNode<K, V>],
|
priv stack: ~[&'self ~TreeNode<K, V>],
|
||||||
priv node: &'self Option<~TreeNode<K, V>>,
|
priv node: &'self Option<~TreeNode<K, V>>,
|
||||||
priv remaining_min: uint,
|
priv remaining_min: uint,
|
||||||
|
@ -277,7 +275,6 @@ impl<'self, K, V> Iterator<(&'self K, &'self V)> for TreeMapIterator<'self, K, V
|
||||||
|
|
||||||
/// Lazy backward iterator over a map
|
/// Lazy backward iterator over a map
|
||||||
pub struct TreeMapRevIterator<'self, K, V> {
|
pub struct TreeMapRevIterator<'self, K, V> {
|
||||||
// all were already priv
|
|
||||||
priv iter: TreeMapIterator<'self, K, V>,
|
priv iter: TreeMapIterator<'self, K, V>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,7 +333,6 @@ fn iter_traverse_complete<'a, K, V>(it: &mut TreeMapIterator<'a, K, V>) {
|
||||||
|
|
||||||
/// Lazy forward iterator over a map that consumes the map while iterating
|
/// Lazy forward iterator over a map that consumes the map while iterating
|
||||||
pub struct TreeMapMoveIterator<K, V> {
|
pub struct TreeMapMoveIterator<K, V> {
|
||||||
// all were laready priv!!
|
|
||||||
priv stack: ~[TreeNode<K, V>],
|
priv stack: ~[TreeNode<K, V>],
|
||||||
priv remaining: uint
|
priv remaining: uint
|
||||||
}
|
}
|
||||||
|
@ -405,7 +401,6 @@ impl<'self, T> Iterator<&'self T> for TreeSetRevIterator<'self, T> {
|
||||||
/// only requirement is that the type of the elements contained ascribes to the
|
/// only requirement is that the type of the elements contained ascribes to the
|
||||||
/// `TotalOrd` trait.
|
/// `TotalOrd` trait.
|
||||||
pub struct TreeSet<T> {
|
pub struct TreeSet<T> {
|
||||||
//all were already priv
|
|
||||||
priv map: TreeMap<T, ()>
|
priv map: TreeMap<T, ()>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,40 +553,34 @@ impl<T: TotalOrd> TreeSet<T> {
|
||||||
|
|
||||||
/// Lazy forward iterator over a set
|
/// Lazy forward iterator over a set
|
||||||
pub struct TreeSetIterator<'self, T> {
|
pub struct TreeSetIterator<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv iter: TreeMapIterator<'self, T, ()>
|
priv iter: TreeMapIterator<'self, T, ()>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lazy backward iterator over a set
|
/// Lazy backward iterator over a set
|
||||||
pub struct TreeSetRevIterator<'self, T> {
|
pub struct TreeSetRevIterator<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv iter: TreeMapRevIterator<'self, T, ()>
|
priv iter: TreeMapRevIterator<'self, T, ()>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lazy iterator producing elements in the set difference (in-order)
|
/// Lazy iterator producing elements in the set difference (in-order)
|
||||||
pub struct Difference<'self, T> {
|
pub struct Difference<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv a: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
priv a: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
||||||
priv b: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
priv b: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lazy iterator producing elements in the set symmetric difference (in-order)
|
/// Lazy iterator producing elements in the set symmetric difference (in-order)
|
||||||
pub struct SymDifference<'self, T> {
|
pub struct SymDifference<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv a: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
priv a: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
||||||
priv b: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
priv b: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lazy iterator producing elements in the set intersection (in-order)
|
/// Lazy iterator producing elements in the set intersection (in-order)
|
||||||
pub struct Intersection<'self, T> {
|
pub struct Intersection<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv a: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
priv a: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
||||||
priv b: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
priv b: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lazy iterator producing elements in the set intersection (in-order)
|
/// Lazy iterator producing elements in the set intersection (in-order)
|
||||||
pub struct Union<'self, T> {
|
pub struct Union<'self, T> {
|
||||||
// all were already priv
|
|
||||||
priv a: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
priv a: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
||||||
priv b: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
priv b: Peekable<&'self T, TreeSetIterator<'self, T>>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,21 +22,19 @@ use std::uint;
|
||||||
|
|
||||||
#[deriving(Clone, Eq)]
|
#[deriving(Clone, Eq)]
|
||||||
pub struct Url {
|
pub struct Url {
|
||||||
// all were made privv bt reedlepee
|
scheme: ~str,
|
||||||
priv scheme: ~str,
|
user: Option<UserInfo>,
|
||||||
priv user: Option<UserInfo>,
|
host: ~str,
|
||||||
priv host: ~str,
|
port: Option<~str>,
|
||||||
priv port: Option<~str>,
|
path: ~str,
|
||||||
priv path: ~str,
|
query: Query,
|
||||||
priv query: Query,
|
fragment: Option<~str>
|
||||||
priv fragment: Option<~str>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deriving(Clone, Eq)]
|
#[deriving(Clone, Eq)]
|
||||||
pub struct UserInfo {
|
pub struct UserInfo {
|
||||||
// all were made privv bt reedlepee
|
user: ~str,
|
||||||
priv user: ~str,
|
pass: Option<~str>
|
||||||
priv pass: Option<~str>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Query = ~[(~str, ~str)];
|
pub type Query = ~[(~str, ~str)];
|
||||||
|
|
|
@ -102,7 +102,6 @@ pub enum UuidVariant {
|
||||||
/// A Universally Unique Identifier (UUID)
|
/// A Universally Unique Identifier (UUID)
|
||||||
pub struct Uuid {
|
pub struct Uuid {
|
||||||
/// The 128-bit number stored in 16 bytes
|
/// The 128-bit number stored in 16 bytes
|
||||||
/// should be public
|
|
||||||
bytes: UuidBytes
|
bytes: UuidBytes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,6 @@ impl WorkMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Database {
|
pub struct Database {
|
||||||
/// all were made by reedlepee
|
|
||||||
priv db_filename: Path,
|
priv db_filename: Path,
|
||||||
priv db_cache: TreeMap<~str, ~str>,
|
priv db_cache: TreeMap<~str, ~str>,
|
||||||
db_dirty: bool
|
db_dirty: bool
|
||||||
|
@ -210,7 +209,6 @@ impl Drop for Database {
|
||||||
|
|
||||||
pub struct Logger {
|
pub struct Logger {
|
||||||
// FIXME #4432: Fill in
|
// FIXME #4432: Fill in
|
||||||
/// alll were made priv reeldepee
|
|
||||||
priv a: ()
|
priv a: ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +227,6 @@ pub type FreshnessMap = TreeMap<~str,extern fn(&str,&str)->bool>;
|
||||||
|
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
//// all were made priv by reedlepee
|
|
||||||
db: RWArc<Database>,
|
db: RWArc<Database>,
|
||||||
priv logger: RWArc<Logger>,
|
priv logger: RWArc<Logger>,
|
||||||
priv cfg: Arc<json::Object>,
|
priv cfg: Arc<json::Object>,
|
||||||
|
@ -243,14 +240,12 @@ pub struct Context {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Prep<'self> {
|
pub struct Prep<'self> {
|
||||||
//// all were made priv by reedlepee
|
|
||||||
priv ctxt: &'self Context,
|
priv ctxt: &'self Context,
|
||||||
priv fn_name: &'self str,
|
priv fn_name: &'self str,
|
||||||
priv declared_inputs: WorkMap,
|
priv declared_inputs: WorkMap,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Exec {
|
pub struct Exec {
|
||||||
//// all were made priv by reedlepee
|
|
||||||
priv discovered_inputs: WorkMap,
|
priv discovered_inputs: WorkMap,
|
||||||
priv discovered_outputs: WorkMap
|
priv discovered_outputs: WorkMap
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,6 @@ condition! {
|
||||||
/// This structure wraps a `*libc::c_char`, and will automatically free the
|
/// This structure wraps a `*libc::c_char`, and will automatically free the
|
||||||
/// memory it is pointing to when it goes out of scope.
|
/// memory it is pointing to when it goes out of scope.
|
||||||
pub struct CString {
|
pub struct CString {
|
||||||
// already priv
|
|
||||||
priv buf: *libc::c_char,
|
priv buf: *libc::c_char,
|
||||||
priv owns_buffer_: bool,
|
priv owns_buffer_: bool,
|
||||||
}
|
}
|
||||||
|
@ -333,7 +332,6 @@ fn check_for_null(v: &[u8], buf: *mut libc::c_char) {
|
||||||
///
|
///
|
||||||
/// Use with the `std::iterator` module.
|
/// Use with the `std::iterator` module.
|
||||||
pub struct CStringIterator<'self> {
|
pub struct CStringIterator<'self> {
|
||||||
// already priv
|
|
||||||
priv ptr: *libc::c_char,
|
priv ptr: *libc::c_char,
|
||||||
priv lifetime: &'self libc::c_char, // FIXME: #5922
|
priv lifetime: &'self libc::c_char, // FIXME: #5922
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ Similar to a mutable option type, but friendlier.
|
||||||
#[deriving(Clone, DeepClone, Eq)]
|
#[deriving(Clone, DeepClone, Eq)]
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
pub struct Cell<T> {
|
pub struct Cell<T> {
|
||||||
// already priv
|
|
||||||
priv value: Option<T>
|
priv value: Option<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,6 @@ use unstable::raw::Closure;
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct Handler<T, U> {
|
pub struct Handler<T, U> {
|
||||||
//already priv
|
|
||||||
priv handle: Closure,
|
priv handle: Closure,
|
||||||
priv prev: Option<@Handler<T, U>>,
|
priv prev: Option<@Handler<T, U>>,
|
||||||
}
|
}
|
||||||
|
@ -84,7 +83,6 @@ pub struct Handler<T, U> {
|
||||||
/// This struct should never be created directly, but rather only through the
|
/// This struct should never be created directly, but rather only through the
|
||||||
/// `condition!` macro provided to all libraries using libstd.
|
/// `condition!` macro provided to all libraries using libstd.
|
||||||
pub struct Condition<T, U> {
|
pub struct Condition<T, U> {
|
||||||
// all made priv by reedlepee
|
|
||||||
/// Name of the condition handler
|
/// Name of the condition handler
|
||||||
name: &'static str,
|
name: &'static str,
|
||||||
/// TLS key used to insert/remove values in TLS.
|
/// TLS key used to insert/remove values in TLS.
|
||||||
|
|
|
@ -477,7 +477,6 @@ pub mod rt;
|
||||||
/// should be formatted. A mutable version of this is passed to all formatting
|
/// should be formatted. A mutable version of this is passed to all formatting
|
||||||
/// traits.
|
/// traits.
|
||||||
pub struct Formatter<'self> {
|
pub struct Formatter<'self> {
|
||||||
// made by reedlepee
|
|
||||||
/// Flags for formatting (packed version of rt::Flag)
|
/// Flags for formatting (packed version of rt::Flag)
|
||||||
flags: uint,
|
flags: uint,
|
||||||
/// Character used as 'fill' whenever there is alignment
|
/// Character used as 'fill' whenever there is alignment
|
||||||
|
@ -502,7 +501,6 @@ pub struct Formatter<'self> {
|
||||||
/// compile time it is ensured that the function and the value have the correct
|
/// compile time it is ensured that the function and the value have the correct
|
||||||
/// types, and then this struct is used to canonicalize arguments to one type.
|
/// types, and then this struct is used to canonicalize arguments to one type.
|
||||||
pub struct Argument<'self> {
|
pub struct Argument<'self> {
|
||||||
// already priv
|
|
||||||
priv formatter: extern "Rust" fn(&util::Void, &mut Formatter),
|
priv formatter: extern "Rust" fn(&util::Void, &mut Formatter),
|
||||||
priv value: &'self util::Void,
|
priv value: &'self util::Void,
|
||||||
}
|
}
|
||||||
|
@ -529,7 +527,6 @@ impl<'self> Arguments<'self> {
|
||||||
/// string at compile-time so usage of the `write` and `format` functions can
|
/// string at compile-time so usage of the `write` and `format` functions can
|
||||||
/// be safely performed.
|
/// be safely performed.
|
||||||
pub struct Arguments<'self> {
|
pub struct Arguments<'self> {
|
||||||
// already priv
|
|
||||||
priv fmt: &'self [rt::Piece<'self>],
|
priv fmt: &'self [rt::Piece<'self>],
|
||||||
priv args: &'self [Argument<'self>],
|
priv args: &'self [Argument<'self>],
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,20 +38,17 @@ pub enum Piece<'self> {
|
||||||
/// Representation of an argument specification.
|
/// Representation of an argument specification.
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
pub struct Argument<'self> {
|
pub struct Argument<'self> {
|
||||||
// made by reedlepee
|
|
||||||
/// Where to find this argument
|
/// Where to find this argument
|
||||||
position: Position<'self>,
|
position: Position<'self>,
|
||||||
/// How to format the argument
|
/// How to format the argument
|
||||||
format: FormatSpec<'self>,
|
format: FormatSpec<'self>,
|
||||||
/// If not `None`, what method to invoke on the argument
|
/// If not `None`, what method to invoke on the argument
|
||||||
// should be public
|
|
||||||
method: Option<~Method<'self>>
|
method: Option<~Method<'self>>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Specification for the formatting of an argument in the format string.
|
/// Specification for the formatting of an argument in the format string.
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
pub struct FormatSpec<'self> {
|
pub struct FormatSpec<'self> {
|
||||||
// made by reedlepee
|
|
||||||
/// Optionally specified character to fill alignment with
|
/// Optionally specified character to fill alignment with
|
||||||
fill: Option<char>,
|
fill: Option<char>,
|
||||||
/// Optionally specified alignment
|
/// Optionally specified alignment
|
||||||
|
@ -128,7 +125,6 @@ pub enum Method<'self> {
|
||||||
/// Structure representing one "arm" of the `plural` function.
|
/// Structure representing one "arm" of the `plural` function.
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
pub struct PluralArm<'self> {
|
pub struct PluralArm<'self> {
|
||||||
// made by reedlepee
|
|
||||||
/// A selector can either be specified by a keyword or with an integer
|
/// A selector can either be specified by a keyword or with an integer
|
||||||
/// literal.
|
/// literal.
|
||||||
selector: Either<PluralKeyword, uint>,
|
selector: Either<PluralKeyword, uint>,
|
||||||
|
@ -149,7 +145,6 @@ pub enum PluralKeyword {
|
||||||
/// Structure representing one "arm" of the `select` function.
|
/// Structure representing one "arm" of the `select` function.
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
pub struct SelectArm<'self> {
|
pub struct SelectArm<'self> {
|
||||||
// made by reedlepee
|
|
||||||
/// String selector which guards this arm
|
/// String selector which guards this arm
|
||||||
selector: &'self str,
|
selector: &'self str,
|
||||||
/// Array of pieces which are the format of this arm
|
/// Array of pieces which are the format of this arm
|
||||||
|
@ -163,7 +158,6 @@ pub struct SelectArm<'self> {
|
||||||
/// This is a recursive-descent parser for the sake of simplicity, and if
|
/// This is a recursive-descent parser for the sake of simplicity, and if
|
||||||
/// necessary there's probably lots of room for improvement performance-wise.
|
/// necessary there's probably lots of room for improvement performance-wise.
|
||||||
pub struct Parser<'self> {
|
pub struct Parser<'self> {
|
||||||
// already priv
|
|
||||||
priv input: &'self str,
|
priv input: &'self str,
|
||||||
priv cur: str::CharOffsetIterator<'self>,
|
priv cur: str::CharOffsetIterator<'self>,
|
||||||
priv depth: uint,
|
priv depth: uint,
|
||||||
|
|
|
@ -29,14 +29,12 @@ pub enum Piece<'self> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Argument<'self> {
|
pub struct Argument<'self> {
|
||||||
/// should be public
|
|
||||||
position: Position,
|
position: Position,
|
||||||
format: FormatSpec,
|
format: FormatSpec,
|
||||||
method: Option<&'self Method<'self>>
|
method: Option<&'self Method<'self>>
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct FormatSpec {
|
pub struct FormatSpec {
|
||||||
/// made by redlepee
|
|
||||||
fill: char,
|
fill: char,
|
||||||
align: parse::Alignment,
|
align: parse::Alignment,
|
||||||
flags: uint,
|
flags: uint,
|
||||||
|
@ -58,13 +56,11 @@ pub enum Method<'self> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct PluralArm<'self> {
|
pub struct PluralArm<'self> {
|
||||||
/// made by redlepee
|
|
||||||
selector: Either<parse::PluralKeyword, uint>,
|
selector: Either<parse::PluralKeyword, uint>,
|
||||||
result: &'self [Piece<'self>],
|
result: &'self [Piece<'self>],
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct SelectArm<'self> {
|
pub struct SelectArm<'self> {
|
||||||
/// made by redlepee
|
|
||||||
selector: &'self str,
|
selector: &'self str,
|
||||||
result: &'self [Piece<'self>],
|
result: &'self [Piece<'self>],
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,6 @@ struct Bucket<K,V> {
|
||||||
/// `IterBytes` traits as `Hash` is automatically implemented for types that
|
/// `IterBytes` traits as `Hash` is automatically implemented for types that
|
||||||
/// implement `IterBytes`.
|
/// implement `IterBytes`.
|
||||||
pub struct HashMap<K,V> {
|
pub struct HashMap<K,V> {
|
||||||
// already priv
|
|
||||||
priv k0: u64,
|
priv k0: u64,
|
||||||
priv k1: u64,
|
priv k1: u64,
|
||||||
priv resize_at: uint,
|
priv resize_at: uint,
|
||||||
|
@ -518,32 +517,27 @@ impl<K:Hash + Eq + Clone,V:Clone> Clone for HashMap<K,V> {
|
||||||
/// HashMap iterator
|
/// HashMap iterator
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct HashMapIterator<'self, K, V> {
|
pub struct HashMapIterator<'self, K, V> {
|
||||||
// already priv
|
|
||||||
priv iter: vec::VecIterator<'self, Option<Bucket<K, V>>>,
|
priv iter: vec::VecIterator<'self, Option<Bucket<K, V>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// HashMap mutable values iterator
|
/// HashMap mutable values iterator
|
||||||
pub struct HashMapMutIterator<'self, K, V> {
|
pub struct HashMapMutIterator<'self, K, V> {
|
||||||
// already priv
|
|
||||||
priv iter: vec::VecMutIterator<'self, Option<Bucket<K, V>>>,
|
priv iter: vec::VecMutIterator<'self, Option<Bucket<K, V>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// HashMap move iterator
|
/// HashMap move iterator
|
||||||
pub struct HashMapMoveIterator<K, V> {
|
pub struct HashMapMoveIterator<K, V> {
|
||||||
// already priv
|
|
||||||
priv iter: vec::MoveRevIterator<Option<Bucket<K, V>>>,
|
priv iter: vec::MoveRevIterator<Option<Bucket<K, V>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// HashSet iterator
|
/// HashSet iterator
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct HashSetIterator<'self, K> {
|
pub struct HashSetIterator<'self, K> {
|
||||||
// already priv
|
|
||||||
priv iter: vec::VecIterator<'self, Option<Bucket<K, ()>>>,
|
priv iter: vec::VecIterator<'self, Option<Bucket<K, ()>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// HashSet move iterator
|
/// HashSet move iterator
|
||||||
pub struct HashSetMoveIterator<K> {
|
pub struct HashSetMoveIterator<K> {
|
||||||
// already priv
|
|
||||||
priv iter: vec::MoveRevIterator<Option<Bucket<K, ()>>>,
|
priv iter: vec::MoveRevIterator<Option<Bucket<K, ()>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -637,7 +631,6 @@ impl<K: Eq + Hash, V> Default for HashMap<K, V> {
|
||||||
/// HashMap where the value is (). As with the `HashMap` type, a `HashSet`
|
/// HashMap where the value is (). As with the `HashMap` type, a `HashSet`
|
||||||
/// requires that the elements implement the `Eq` and `Hash` traits.
|
/// requires that the elements implement the `Eq` and `Hash` traits.
|
||||||
pub struct HashSet<T> {
|
pub struct HashSet<T> {
|
||||||
// already priv
|
|
||||||
priv map: HashMap<T, ()>
|
priv map: HashMap<T, ()>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1009,7 +1009,6 @@ impl<R:Reader,C> Reader for Wrapper<R, C> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct FILERes {
|
pub struct FILERes {
|
||||||
// all by reedlepee
|
|
||||||
priv f: *libc::FILE,
|
priv f: *libc::FILE,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1080,6 @@ pub fn file_reader(path: &Path) -> Result<@Reader, ~str> {
|
||||||
|
|
||||||
// Byte readers
|
// Byte readers
|
||||||
pub struct BytesReader {
|
pub struct BytesReader {
|
||||||
// all by reedlepee
|
|
||||||
// FIXME(#5723) see other FIXME below
|
// FIXME(#5723) see other FIXME below
|
||||||
// FIXME(#7268) this should also be parameterized over <'self>
|
// FIXME(#7268) this should also be parameterized over <'self>
|
||||||
bytes: &'static [u8],
|
bytes: &'static [u8],
|
||||||
|
@ -1284,7 +1282,6 @@ impl Writer for fd_t {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct FdRes {
|
pub struct FdRes {
|
||||||
// all by reedlepee
|
|
||||||
priv fd: fd_t,
|
priv fd: fd_t,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1677,7 +1674,6 @@ pub fn println(s: &str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct BytesWriter {
|
pub struct BytesWriter {
|
||||||
// all by reedlepee
|
|
||||||
bytes: @mut ~[u8],
|
bytes: @mut ~[u8],
|
||||||
pos: @mut uint,
|
pos: @mut uint,
|
||||||
}
|
}
|
||||||
|
@ -1796,7 +1792,6 @@ pub mod fsync {
|
||||||
|
|
||||||
// Artifacts that need to fsync on destruction
|
// Artifacts that need to fsync on destruction
|
||||||
pub struct Res<t> {
|
pub struct Res<t> {
|
||||||
// all by reedlepee
|
|
||||||
priv arg: Arg<t>,
|
priv arg: Arg<t>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1820,7 +1815,6 @@ pub mod fsync {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Arg<t> {
|
pub struct Arg<t> {
|
||||||
// all by reedlepee
|
|
||||||
priv val: t,
|
priv val: t,
|
||||||
priv opt_level: Option<Level>,
|
priv opt_level: Option<Level>,
|
||||||
priv fsync_fn: extern "Rust" fn(f: &t, Level) -> int,
|
priv fsync_fn: extern "Rust" fn(f: &t, Level) -> int,
|
||||||
|
|
|
@ -765,8 +765,6 @@ impl<A, B, T: ExactSize<A>, U: ExactSize<B>> ExactSize<(A, B)> for Zip<T, U> {}
|
||||||
/// An double-ended iterator with the direction inverted
|
/// An double-ended iterator with the direction inverted
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct Invert<T> {
|
pub struct Invert<T> {
|
||||||
// already priv
|
|
||||||
// already priv
|
|
||||||
priv iter: T
|
priv iter: T
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,14 +226,13 @@ pub mod types {
|
||||||
use libc::types::common::c95::{c_void};
|
use libc::types::common::c95::{c_void};
|
||||||
use libc::types::os::arch::c95::{c_char, size_t};
|
use libc::types::os::arch::c95::{c_char, size_t};
|
||||||
pub struct glob_t {
|
pub struct glob_t {
|
||||||
// all made by reedlepee
|
gl_pathc: size_t,
|
||||||
priv gl_pathc: size_t,
|
gl_pathv: **c_char,
|
||||||
priv gl_pathv: **c_char,
|
gl_offs: size_t,
|
||||||
priv gl_offs: size_t,
|
|
||||||
|
|
||||||
priv __unused1: *c_void,
|
__unused1: *c_void,
|
||||||
priv __unused2: *c_void,
|
__unused2: *c_void,
|
||||||
priv __unused3: *c_void,
|
__unused3: *c_void,
|
||||||
__unused4: *c_void,
|
__unused4: *c_void,
|
||||||
__unused5: *c_void,
|
__unused5: *c_void,
|
||||||
}
|
}
|
||||||
|
@ -305,7 +304,6 @@ pub mod types {
|
||||||
pub type blkcnt_t = i32;
|
pub type blkcnt_t = i32;
|
||||||
|
|
||||||
pub struct stat {
|
pub struct stat {
|
||||||
// all made by reedlepee
|
|
||||||
st_dev: dev_t,
|
st_dev: dev_t,
|
||||||
__pad1: c_short,
|
__pad1: c_short,
|
||||||
st_ino: ino_t,
|
st_ino: ino_t,
|
||||||
|
@ -339,16 +337,15 @@ pub mod types {
|
||||||
pub type blkcnt_t = u32;
|
pub type blkcnt_t = u32;
|
||||||
|
|
||||||
pub struct stat {
|
pub struct stat {
|
||||||
// all made priv by reedlepee
|
|
||||||
st_dev: c_ulonglong,
|
st_dev: c_ulonglong,
|
||||||
priv __pad0: [c_uchar, ..4],
|
__pad0: [c_uchar, ..4],
|
||||||
priv __st_ino: ino_t,
|
__st_ino: ino_t,
|
||||||
st_mode: c_uint,
|
st_mode: c_uint,
|
||||||
st_nlink: c_uint,
|
st_nlink: c_uint,
|
||||||
st_uid: uid_t,
|
st_uid: uid_t,
|
||||||
st_gid: gid_t,
|
st_gid: gid_t,
|
||||||
st_rdev: c_ulonglong,
|
st_rdev: c_ulonglong,
|
||||||
priv __pad3: [c_uchar, ..4],
|
__pad3: [c_uchar, ..4],
|
||||||
st_size: c_longlong,
|
st_size: c_longlong,
|
||||||
st_blksize: blksize_t,
|
st_blksize: blksize_t,
|
||||||
st_blocks: c_ulonglong,
|
st_blocks: c_ulonglong,
|
||||||
|
@ -373,18 +370,17 @@ pub mod types {
|
||||||
pub type blkcnt_t = i32;
|
pub type blkcnt_t = i32;
|
||||||
|
|
||||||
pub struct stat {
|
pub struct stat {
|
||||||
/// all made priv by reedlepee
|
|
||||||
st_dev: c_ulong,
|
st_dev: c_ulong,
|
||||||
priv st_pad1: [c_long, ..3],
|
st_pad1: [c_long, ..3],
|
||||||
st_ino: ino_t,
|
st_ino: ino_t,
|
||||||
st_mode: mode_t,
|
st_mode: mode_t,
|
||||||
st_nlink: nlink_t,
|
st_nlink: nlink_t,
|
||||||
st_uid: uid_t,
|
st_uid: uid_t,
|
||||||
st_gid: gid_t,
|
st_gid: gid_t,
|
||||||
st_rdev: c_ulong,
|
st_rdev: c_ulong,
|
||||||
priv st_pad2: [c_long, ..2],
|
st_pad2: [c_long, ..2],
|
||||||
st_size: off_t,
|
st_size: off_t,
|
||||||
priv st_pad3: c_long,
|
st_pad3: c_long,
|
||||||
st_atime: time_t,
|
st_atime: time_t,
|
||||||
st_atime_nsec: c_long,
|
st_atime_nsec: c_long,
|
||||||
st_mtime: time_t,
|
st_mtime: time_t,
|
||||||
|
@ -393,7 +389,7 @@ pub mod types {
|
||||||
st_ctime_nsec: c_long,
|
st_ctime_nsec: c_long,
|
||||||
st_blksize: blksize_t,
|
st_blksize: blksize_t,
|
||||||
st_blocks: blkcnt_t,
|
st_blocks: blkcnt_t,
|
||||||
priv st_pad5: [c_long, ..14],
|
st_pad5: [c_long, ..14],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub mod posix08 {}
|
pub mod posix08 {}
|
||||||
|
@ -448,14 +444,13 @@ pub mod types {
|
||||||
pub type blksize_t = i64;
|
pub type blksize_t = i64;
|
||||||
pub type blkcnt_t = i64;
|
pub type blkcnt_t = i64;
|
||||||
pub struct stat {
|
pub struct stat {
|
||||||
// all made by reedlepee
|
|
||||||
st_dev: dev_t,
|
st_dev: dev_t,
|
||||||
st_ino: ino_t,
|
st_ino: ino_t,
|
||||||
st_nlink: nlink_t,
|
st_nlink: nlink_t,
|
||||||
st_mode: mode_t,
|
st_mode: mode_t,
|
||||||
st_uid: uid_t,
|
st_uid: uid_t,
|
||||||
st_gid: gid_t,
|
st_gid: gid_t,
|
||||||
priv __pad0: c_int,
|
__pad0: c_int,
|
||||||
st_rdev: dev_t,
|
st_rdev: dev_t,
|
||||||
st_size: off_t,
|
st_size: off_t,
|
||||||
st_blksize: blksize_t,
|
st_blksize: blksize_t,
|
||||||
|
@ -466,7 +461,7 @@ pub mod types {
|
||||||
st_mtime_nsec: c_long,
|
st_mtime_nsec: c_long,
|
||||||
st_ctime: time_t,
|
st_ctime: time_t,
|
||||||
st_ctime_nsec: c_long,
|
st_ctime_nsec: c_long,
|
||||||
priv __unused: [c_long, ..3],
|
__unused: [c_long, ..3],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub mod posix08 {
|
pub mod posix08 {
|
||||||
|
@ -485,20 +480,19 @@ pub mod types {
|
||||||
use libc::types::common::c95::{c_void};
|
use libc::types::common::c95::{c_void};
|
||||||
use libc::types::os::arch::c95::{c_char, c_int, size_t};
|
use libc::types::os::arch::c95::{c_char, c_int, size_t};
|
||||||
pub struct glob_t {
|
pub struct glob_t {
|
||||||
// all made priv by reedlepee
|
gl_pathc: size_t,
|
||||||
priv gl_pathc: size_t,
|
__unused1: size_t,
|
||||||
priv __unused1: size_t,
|
gl_offs: size_t,
|
||||||
priv gl_offs: size_t,
|
__unused2: c_int,
|
||||||
priv __unused2: c_int,
|
gl_pathv: **c_char,
|
||||||
priv gl_pathv: **c_char,
|
|
||||||
|
|
||||||
priv __unused3: *c_void,
|
__unused3: *c_void,
|
||||||
|
|
||||||
__unused4: *c_void,
|
__unused4: *c_void,
|
||||||
__unused5: *c_void,
|
__unused5: *c_void,
|
||||||
priv __unused6: *c_void,
|
__unused6: *c_void,
|
||||||
priv __unused7: *c_void,
|
__unused7: *c_void,
|
||||||
priv __unused8: *c_void,
|
__unused8: *c_void,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -552,7 +546,6 @@ pub mod types {
|
||||||
pub type blkcnt_t = i64;
|
pub type blkcnt_t = i64;
|
||||||
pub type fflags_t = u32;
|
pub type fflags_t = u32;
|
||||||
pub struct stat {
|
pub struct stat {
|
||||||
// all made by reedlepee
|
|
||||||
st_dev: dev_t,
|
st_dev: dev_t,
|
||||||
st_ino: ino_t,
|
st_ino: ino_t,
|
||||||
st_mode: mode_t,
|
st_mode: mode_t,
|
||||||
|
@ -569,12 +562,12 @@ pub mod types {
|
||||||
st_size: off_t,
|
st_size: off_t,
|
||||||
st_blocks: blkcnt_t,
|
st_blocks: blkcnt_t,
|
||||||
st_blksize: blksize_t,
|
st_blksize: blksize_t,
|
||||||
priv st_flags: fflags_t,
|
st_flags: fflags_t,
|
||||||
priv st_gen: uint32_t,
|
st_gen: uint32_t,
|
||||||
priv st_lspare: int32_t,
|
st_lspare: int32_t,
|
||||||
priv st_birthtime: time_t,
|
st_birthtime: time_t,
|
||||||
priv st_birthtime_nsec: c_long,
|
st_birthtime_nsec: c_long,
|
||||||
priv __unused: [uint8_t, ..2],
|
__unused: [uint8_t, ..2],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub mod posix08 {
|
pub mod posix08 {
|
||||||
|
@ -598,7 +591,6 @@ pub mod types {
|
||||||
// Note: this is the struct called stat64 in win32. Not stat,
|
// Note: this is the struct called stat64 in win32. Not stat,
|
||||||
// nor stati64.
|
// nor stati64.
|
||||||
pub struct stat {
|
pub struct stat {
|
||||||
// all made privv by reedlepee
|
|
||||||
st_dev: dev_t,
|
st_dev: dev_t,
|
||||||
st_ino: ino_t,
|
st_ino: ino_t,
|
||||||
st_mode: mode_t,
|
st_mode: mode_t,
|
||||||
|
@ -705,49 +697,47 @@ pub mod types {
|
||||||
pub type int64 = i64;
|
pub type int64 = i64;
|
||||||
|
|
||||||
pub struct STARTUPINFO {
|
pub struct STARTUPINFO {
|
||||||
// all made by reedlepee
|
cb: DWORD,
|
||||||
priv cb: DWORD,
|
lpReserved: LPTSTR,
|
||||||
priv lpReserved: LPTSTR,
|
lpDesktop: LPTSTR,
|
||||||
priv lpDesktop: LPTSTR,
|
lpTitle: LPTSTR,
|
||||||
priv lpTitle: LPTSTR,
|
dwX: DWORD,
|
||||||
priv dwX: DWORD,
|
dwY: DWORD,
|
||||||
priv dwY: DWORD,
|
dwXSize: DWORD,
|
||||||
priv dwXSize: DWORD,
|
dwYSize: DWORD,
|
||||||
priv dwYSize: DWORD,
|
dwXCountChars: DWORD,
|
||||||
priv dwXCountChars: DWORD,
|
dwYCountCharts: DWORD,
|
||||||
priv dwYCountCharts: DWORD,
|
dwFillAttribute: DWORD,
|
||||||
priv dwFillAttribute: DWORD,
|
dwFlags: DWORD,
|
||||||
priv dwFlags: DWORD,
|
wShowWindow: WORD,
|
||||||
priv wShowWindow: WORD,
|
cbReserved2: WORD,
|
||||||
priv cbReserved2: WORD,
|
lpReserved2: LPBYTE,
|
||||||
priv lpReserved2: LPBYTE,
|
hStdInput: HANDLE,
|
||||||
priv hStdInput: HANDLE,
|
hStdOutput: HANDLE,
|
||||||
priv hStdOutput: HANDLE,
|
hStdError: HANDLE
|
||||||
priv hStdError: HANDLE
|
|
||||||
}
|
}
|
||||||
pub type LPSTARTUPINFO = *mut STARTUPINFO;
|
pub type LPSTARTUPINFO = *mut STARTUPINFO;
|
||||||
|
|
||||||
pub struct PROCESS_INFORMATION {
|
pub struct PROCESS_INFORMATION {
|
||||||
// all made by reedlepee
|
hProcess: HANDLE,
|
||||||
priv hProcess: HANDLE,
|
hThread: HANDLE,
|
||||||
priv hThread: HANDLE,
|
dwProcessId: DWORD,
|
||||||
priv dwProcessId: DWORD,
|
dwThreadId: DWORD
|
||||||
priv dwThreadId: DWORD
|
|
||||||
}
|
}
|
||||||
pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
|
pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
|
||||||
|
|
||||||
pub struct SYSTEM_INFO {
|
pub struct SYSTEM_INFO {
|
||||||
// all made by reedlepee
|
wProcessorArchitecture: WORD,
|
||||||
priv wProcessorArchitecture: WORD,
|
wReserved: WORD,
|
||||||
priv wReserved: WORD,
|
dwPageSize: DWORD,
|
||||||
priv dwPageSize: DWORD,
|
lpMinimumApplicationAddress: LPVOID,
|
||||||
priv lpMinimumApplicationAddress: LPVOID,
|
lpMaximumApplicationAddress: LPVOID,
|
||||||
priv lpMaximumApplicationAddress: LPVOID,
|
dwActiveProcessorMask: DWORD,
|
||||||
priv dwActiveProcessorMask: DWORD,
|
dwNumberOfProcessors: DWORD,
|
||||||
priv dwNumberOfProcessors: DWORD,
|
dwProcessorType: DWORD,
|
||||||
priv dwProcessorType: DWORD,
|
dwAllocationGranularity: DWORD,
|
||||||
priv dwAllocationGranularity: DWORD,
|
wProcessorLevel: WORD,
|
||||||
priv wProcessorLevel: WORD,
|
wProcessorRevision: WORD
|
||||||
priv wProcessorRevision: WORD
|
|
||||||
}
|
}
|
||||||
pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
|
pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
|
||||||
|
|
||||||
|
@ -770,14 +760,13 @@ pub mod types {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct MEMORY_BASIC_INFORMATION {
|
pub struct MEMORY_BASIC_INFORMATION {
|
||||||
// all made by reedlepee
|
BaseAddress: LPVOID,
|
||||||
priv BaseAddress: LPVOID,
|
AllocationBase: LPVOID,
|
||||||
priv AllocationBase: LPVOID,
|
AllocationProtect: DWORD,
|
||||||
priv AllocationProtect: DWORD,
|
RegionSize: SIZE_T,
|
||||||
priv RegionSize: SIZE_T,
|
State: DWORD,
|
||||||
priv State: DWORD,
|
Protect: DWORD,
|
||||||
priv Protect: DWORD,
|
Type: DWORD
|
||||||
priv Type: DWORD
|
|
||||||
}
|
}
|
||||||
pub type LPMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION;
|
pub type LPMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION;
|
||||||
}
|
}
|
||||||
|
@ -874,50 +863,47 @@ pub mod types {
|
||||||
pub type int64 = i64;
|
pub type int64 = i64;
|
||||||
|
|
||||||
pub struct STARTUPINFO {
|
pub struct STARTUPINFO {
|
||||||
// all made by reedlepee
|
cb: DWORD,
|
||||||
priv cb: DWORD,
|
lpReserved: LPTSTR,
|
||||||
priv lpReserved: LPTSTR,
|
lpDesktop: LPTSTR,
|
||||||
priv lpDesktop: LPTSTR,
|
lpTitle: LPTSTR,
|
||||||
priv lpTitle: LPTSTR,
|
dwX: DWORD,
|
||||||
priv dwX: DWORD,
|
dwY: DWORD,
|
||||||
priv dwY: DWORD,
|
dwXSize: DWORD,
|
||||||
priv dwXSize: DWORD,
|
dwYSize: DWORD,
|
||||||
priv dwYSize: DWORD,
|
dwXCountChars: DWORD,
|
||||||
priv dwXCountChars: DWORD,
|
dwYCountCharts: DWORD,
|
||||||
priv dwYCountCharts: DWORD,
|
dwFillAttribute: DWORD,
|
||||||
priv dwFillAttribute: DWORD,
|
dwFlags: DWORD,
|
||||||
priv dwFlags: DWORD,
|
wShowWindow: WORD,
|
||||||
priv wShowWindow: WORD,
|
cbReserved2: WORD,
|
||||||
priv cbReserved2: WORD,
|
lpReserved2: LPBYTE,
|
||||||
priv lpReserved2: LPBYTE,
|
hStdInput: HANDLE,
|
||||||
priv hStdInput: HANDLE,
|
hStdOutput: HANDLE,
|
||||||
priv hStdOutput: HANDLE,
|
hStdError: HANDLE
|
||||||
priv hStdError: HANDLE
|
|
||||||
}
|
}
|
||||||
pub type LPSTARTUPINFO = *mut STARTUPINFO;
|
pub type LPSTARTUPINFO = *mut STARTUPINFO;
|
||||||
|
|
||||||
pub struct PROCESS_INFORMATION {
|
pub struct PROCESS_INFORMATION {
|
||||||
// all made by reedlepee
|
hProcess: HANDLE,
|
||||||
priv hProcess: HANDLE,
|
hThread: HANDLE,
|
||||||
priv hThread: HANDLE,
|
dwProcessId: DWORD,
|
||||||
priv dwProcessId: DWORD,
|
dwThreadId: DWORD
|
||||||
priv dwThreadId: DWORD
|
|
||||||
}
|
}
|
||||||
pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
|
pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
|
||||||
|
|
||||||
pub struct SYSTEM_INFO {
|
pub struct SYSTEM_INFO {
|
||||||
// all made by reedlepee
|
wProcessorArchitecture: WORD,
|
||||||
priv wProcessorArchitecture: WORD,
|
wReserved: WORD,
|
||||||
priv wReserved: WORD,
|
dwPageSize: DWORD,
|
||||||
priv dwPageSize: DWORD,
|
lpMinimumApplicationAddress: LPVOID,
|
||||||
priv lpMinimumApplicationAddress: LPVOID,
|
lpMaximumApplicationAddress: LPVOID,
|
||||||
priv lpMaximumApplicationAddress: LPVOID,
|
dwActiveProcessorMask: DWORD,
|
||||||
priv dwActiveProcessorMask: DWORD,
|
dwNumberOfProcessors: DWORD,
|
||||||
priv dwNumberOfProcessors: DWORD,
|
dwProcessorType: DWORD,
|
||||||
priv dwProcessorType: DWORD,
|
dwAllocationGranularity: DWORD,
|
||||||
priv dwAllocationGranularity: DWORD,
|
wProcessorLevel: WORD,
|
||||||
priv wProcessorLevel: WORD,
|
wProcessorRevision: WORD
|
||||||
priv wProcessorRevision: WORD
|
|
||||||
}
|
}
|
||||||
pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
|
pub type LPSYSTEM_INFO = *mut SYSTEM_INFO;
|
||||||
|
|
||||||
|
@ -940,14 +926,13 @@ pub mod types {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct MEMORY_BASIC_INFORMATION {
|
pub struct MEMORY_BASIC_INFORMATION {
|
||||||
// all made by reedlepee
|
BaseAddress: LPVOID,
|
||||||
priv BaseAddress: LPVOID,
|
AllocationBase: LPVOID,
|
||||||
priv AllocationBase: LPVOID,
|
AllocationProtect: DWORD,
|
||||||
priv AllocationProtect: DWORD,
|
RegionSize: SIZE_T,
|
||||||
priv RegionSize: SIZE_T,
|
State: DWORD,
|
||||||
priv State: DWORD,
|
Protect: DWORD,
|
||||||
priv Protect: DWORD,
|
Type: DWORD
|
||||||
priv Type: DWORD
|
|
||||||
}
|
}
|
||||||
pub type LPMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION;
|
pub type LPMEMORY_BASIC_INFORMATION = *mut MEMORY_BASIC_INFORMATION;
|
||||||
}
|
}
|
||||||
|
@ -961,20 +946,19 @@ pub mod types {
|
||||||
use libc::types::common::c95::{c_void};
|
use libc::types::common::c95::{c_void};
|
||||||
use libc::types::os::arch::c95::{c_char, c_int, size_t};
|
use libc::types::os::arch::c95::{c_char, c_int, size_t};
|
||||||
pub struct glob_t {
|
pub struct glob_t {
|
||||||
// all made by reedlepee
|
gl_pathc: size_t,
|
||||||
priv gl_pathc: size_t,
|
__unused1: c_int,
|
||||||
priv __unused1: c_int,
|
gl_offs: size_t,
|
||||||
priv gl_offs: size_t,
|
__unused2: c_int,
|
||||||
priv __unused2: c_int,
|
gl_pathv: **c_char,
|
||||||
priv gl_pathv: **c_char,
|
|
||||||
|
|
||||||
priv __unused3: *c_void,
|
__unused3: *c_void,
|
||||||
|
|
||||||
__unused4: *c_void,
|
__unused4: *c_void,
|
||||||
__unused5: *c_void,
|
__unused5: *c_void,
|
||||||
priv __unused6: *c_void,
|
__unused6: *c_void,
|
||||||
priv __unused7: *c_void,
|
__unused7: *c_void,
|
||||||
priv __unused8: *c_void,
|
__unused8: *c_void,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1027,7 +1011,6 @@ pub mod types {
|
||||||
pub type blkcnt_t = i32;
|
pub type blkcnt_t = i32;
|
||||||
|
|
||||||
pub struct stat {
|
pub struct stat {
|
||||||
// all made by reedlepee
|
|
||||||
st_dev: dev_t,
|
st_dev: dev_t,
|
||||||
st_mode: mode_t,
|
st_mode: mode_t,
|
||||||
st_nlink: nlink_t,
|
st_nlink: nlink_t,
|
||||||
|
@ -1041,15 +1024,15 @@ pub mod types {
|
||||||
st_mtime_nsec: c_long,
|
st_mtime_nsec: c_long,
|
||||||
st_ctime: time_t,
|
st_ctime: time_t,
|
||||||
st_ctime_nsec: c_long,
|
st_ctime_nsec: c_long,
|
||||||
priv st_birthtime: time_t,
|
st_birthtime: time_t,
|
||||||
priv st_birthtime_nsec: c_long,
|
st_birthtime_nsec: c_long,
|
||||||
st_size: off_t,
|
st_size: off_t,
|
||||||
st_blocks: blkcnt_t,
|
st_blocks: blkcnt_t,
|
||||||
st_blksize: blksize_t,
|
st_blksize: blksize_t,
|
||||||
priv st_flags: uint32_t,
|
st_flags: uint32_t,
|
||||||
priv st_gen: uint32_t,
|
st_gen: uint32_t,
|
||||||
priv st_lspare: int32_t,
|
st_lspare: int32_t,
|
||||||
priv st_qspare: [int64_t, ..2],
|
st_qspare: [int64_t, ..2],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub mod posix08 {
|
pub mod posix08 {
|
||||||
|
@ -1109,7 +1092,6 @@ pub mod types {
|
||||||
pub type blkcnt_t = i32;
|
pub type blkcnt_t = i32;
|
||||||
|
|
||||||
pub struct stat {
|
pub struct stat {
|
||||||
// all made by reedlepee
|
|
||||||
st_dev: dev_t,
|
st_dev: dev_t,
|
||||||
st_mode: mode_t,
|
st_mode: mode_t,
|
||||||
st_nlink: nlink_t,
|
st_nlink: nlink_t,
|
||||||
|
@ -1123,15 +1105,15 @@ pub mod types {
|
||||||
st_mtime_nsec: c_long,
|
st_mtime_nsec: c_long,
|
||||||
st_ctime: time_t,
|
st_ctime: time_t,
|
||||||
st_ctime_nsec: c_long,
|
st_ctime_nsec: c_long,
|
||||||
priv st_birthtime: time_t,
|
st_birthtime: time_t,
|
||||||
priv st_birthtime_nsec: c_long,
|
st_birthtime_nsec: c_long,
|
||||||
st_size: off_t,
|
st_size: off_t,
|
||||||
st_blocks: blkcnt_t,
|
st_blocks: blkcnt_t,
|
||||||
st_blksize: blksize_t,
|
st_blksize: blksize_t,
|
||||||
priv st_flags: uint32_t,
|
st_flags: uint32_t,
|
||||||
priv st_gen: uint32_t,
|
st_gen: uint32_t,
|
||||||
priv st_lspare: int32_t,
|
st_lspare: int32_t,
|
||||||
priv st_qspare: [int64_t, ..2],
|
st_qspare: [int64_t, ..2],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub mod posix08 {
|
pub mod posix08 {
|
||||||
|
|
|
@ -454,7 +454,6 @@ impl<T: Zero> Option<T> {
|
||||||
/// An iterator that yields either one or zero elements
|
/// An iterator that yields either one or zero elements
|
||||||
#[deriving(Clone, DeepClone)]
|
#[deriving(Clone, DeepClone)]
|
||||||
pub struct OptionIterator<A> {
|
pub struct OptionIterator<A> {
|
||||||
// already priv
|
|
||||||
priv opt: Option<A>
|
priv opt: Option<A>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -412,7 +412,6 @@ pub fn fsync_fd(fd: c_int, _l: io::fsync::Level) -> c_int {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Pipe {
|
pub struct Pipe {
|
||||||
// made priv by reedlepee
|
|
||||||
input: c_int,
|
input: c_int,
|
||||||
out: c_int
|
out: c_int
|
||||||
}
|
}
|
||||||
|
@ -1381,7 +1380,6 @@ pub fn page_size() -> uint {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct MemoryMap {
|
pub struct MemoryMap {
|
||||||
// made priv by reedlepee
|
|
||||||
data: *mut u8,
|
data: *mut u8,
|
||||||
len: size_t,
|
len: size_t,
|
||||||
kind: MemoryMapKind
|
kind: MemoryMapKind
|
||||||
|
|
|
@ -524,7 +524,6 @@ pub trait GenericPathUnsafe {
|
||||||
|
|
||||||
/// Helper struct for printing paths with format!()
|
/// Helper struct for printing paths with format!()
|
||||||
pub struct Display<'self, P> {
|
pub struct Display<'self, P> {
|
||||||
/// already priv
|
|
||||||
priv path: &'self P,
|
priv path: &'self P,
|
||||||
priv filename: bool
|
priv filename: bool
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,6 @@ pub type RevStrComponentIter<'self> = Map<'self, &'self [u8], Option<&'self str>
|
||||||
/// Represents a POSIX file path
|
/// Represents a POSIX file path
|
||||||
#[deriving(Clone, DeepClone)]
|
#[deriving(Clone, DeepClone)]
|
||||||
pub struct Path {
|
pub struct Path {
|
||||||
/// already priv
|
|
||||||
priv repr: ~[u8], // assumed to never be empty or contain NULs
|
priv repr: ~[u8], // assumed to never be empty or contain NULs
|
||||||
priv sepidx: Option<uint> // index of the final separator in repr
|
priv sepidx: Option<uint> // index of the final separator in repr
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,6 @@ pub type RevComponentIter<'self> = Map<'self, Option<&'self str>, &'self [u8],
|
||||||
// preserved by the data structure; let the Windows API error out on them.
|
// preserved by the data structure; let the Windows API error out on them.
|
||||||
#[deriving(Clone, DeepClone)]
|
#[deriving(Clone, DeepClone)]
|
||||||
pub struct Path {
|
pub struct Path {
|
||||||
/// already priv
|
|
||||||
priv repr: ~str, // assumed to never be empty
|
priv repr: ~str, // assumed to never be empty
|
||||||
priv prefix: Option<PathPrefix>,
|
priv prefix: Option<PathPrefix>,
|
||||||
priv sepidx: Option<uint> // index of the final separator in the non-prefix portion of repr
|
priv sepidx: Option<uint> // index of the final separator in the non-prefix portion of repr
|
||||||
|
|
|
@ -23,7 +23,6 @@ static RAND_SIZE: u32 = 1 << RAND_SIZE_LEN;
|
||||||
///
|
///
|
||||||
/// The ISAAC algorithm is suitable for cryptographic purposes.
|
/// The ISAAC algorithm is suitable for cryptographic purposes.
|
||||||
pub struct IsaacRng {
|
pub struct IsaacRng {
|
||||||
/// already priv
|
|
||||||
priv cnt: u32,
|
priv cnt: u32,
|
||||||
priv rsl: [u32, .. RAND_SIZE],
|
priv rsl: [u32, .. RAND_SIZE],
|
||||||
priv mem: [u32, .. RAND_SIZE],
|
priv mem: [u32, .. RAND_SIZE],
|
||||||
|
@ -219,7 +218,6 @@ static RAND_SIZE_64: uint = 1 << RAND_SIZE_64_LEN;
|
||||||
///
|
///
|
||||||
/// The ISAAC algorithm is suitable for cryptographic purposes.
|
/// The ISAAC algorithm is suitable for cryptographic purposes.
|
||||||
pub struct Isaac64Rng {
|
pub struct Isaac64Rng {
|
||||||
/// already priv
|
|
||||||
priv cnt: uint,
|
priv cnt: uint,
|
||||||
priv rsl: [u64, .. RAND_SIZE_64],
|
priv rsl: [u64, .. RAND_SIZE_64],
|
||||||
priv mem: [u64, .. RAND_SIZE_64],
|
priv mem: [u64, .. RAND_SIZE_64],
|
||||||
|
|
|
@ -82,11 +82,10 @@ pub trait Rand {
|
||||||
|
|
||||||
/// A value with a particular weight compared to other values
|
/// A value with a particular weight compared to other values
|
||||||
pub struct Weighted<T> {
|
pub struct Weighted<T> {
|
||||||
/// made priv by reedlepee
|
|
||||||
/// The numerical weight of this item
|
/// The numerical weight of this item
|
||||||
priv weight: uint,
|
weight: uint,
|
||||||
/// The actual item which is being weighted
|
/// The actual item which is being weighted
|
||||||
priv item: T,
|
item: T,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A random number generator
|
/// A random number generator
|
||||||
|
@ -538,13 +537,11 @@ pub fn rng() -> StdRng {
|
||||||
/// The standard RNG. This is designed to be efficient on the current
|
/// The standard RNG. This is designed to be efficient on the current
|
||||||
/// platform.
|
/// platform.
|
||||||
#[cfg(not(target_word_size="64"))]
|
#[cfg(not(target_word_size="64"))]
|
||||||
// already priv
|
|
||||||
pub struct StdRng { priv rng: IsaacRng }
|
pub struct StdRng { priv rng: IsaacRng }
|
||||||
|
|
||||||
/// The standard RNG. This is designed to be efficient on the current
|
/// The standard RNG. This is designed to be efficient on the current
|
||||||
/// platform.
|
/// platform.
|
||||||
#[cfg(target_word_size="64")]
|
#[cfg(target_word_size="64")]
|
||||||
// already priv
|
|
||||||
pub struct StdRng { priv rng: Isaac64Rng }
|
pub struct StdRng { priv rng: Isaac64Rng }
|
||||||
|
|
||||||
impl StdRng {
|
impl StdRng {
|
||||||
|
@ -606,7 +603,6 @@ pub fn weak_rng() -> XorShiftRng {
|
||||||
/// but is very fast. If you do not know for sure that it fits your
|
/// but is very fast. If you do not know for sure that it fits your
|
||||||
/// requirements, use a more secure one such as `IsaacRng`.
|
/// requirements, use a more secure one such as `IsaacRng`.
|
||||||
pub struct XorShiftRng {
|
pub struct XorShiftRng {
|
||||||
// already priv
|
|
||||||
priv x: u32,
|
priv x: u32,
|
||||||
priv y: u32,
|
priv y: u32,
|
||||||
priv z: u32,
|
priv z: u32,
|
||||||
|
|
|
@ -36,7 +36,6 @@ type HCRYPTPROV = c_long;
|
||||||
/// This does not block.
|
/// This does not block.
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
pub struct OSRng {
|
pub struct OSRng {
|
||||||
// already priv
|
|
||||||
priv inner: ReaderRng<file::FileStream>
|
priv inner: ReaderRng<file::FileStream>
|
||||||
}
|
}
|
||||||
/// A random number generator that retrieves randomness straight from
|
/// A random number generator that retrieves randomness straight from
|
||||||
|
@ -46,7 +45,6 @@ pub struct OSRng {
|
||||||
/// This does not block.
|
/// This does not block.
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
pub struct OSRng {
|
pub struct OSRng {
|
||||||
// already priv
|
|
||||||
priv hcryptprov: HCRYPTPROV
|
priv hcryptprov: HCRYPTPROV
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ use rand::Rng;
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
pub struct ReaderRng<R> {
|
pub struct ReaderRng<R> {
|
||||||
// already priv
|
|
||||||
priv reader: R
|
priv reader: R
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,11 @@ static DEFAULT_GENERATION_THRESHOLD: uint = 32 * 1024;
|
||||||
/// A wrapper around any RNG which reseeds the underlying RNG after it
|
/// A wrapper around any RNG which reseeds the underlying RNG after it
|
||||||
/// has generated a certain number of random bytes.
|
/// has generated a certain number of random bytes.
|
||||||
pub struct ReseedingRng<R, Rsdr> {
|
pub struct ReseedingRng<R, Rsdr> {
|
||||||
// already priv
|
|
||||||
priv rng: R,
|
priv rng: R,
|
||||||
priv generation_threshold: uint,
|
priv generation_threshold: uint,
|
||||||
priv bytes_generated: uint,
|
priv bytes_generated: uint,
|
||||||
/// Controls the behaviour when reseeding the RNG.
|
/// Controls the behaviour when reseeding the RNG.
|
||||||
// made by reedlepee
|
reseeder: Rsdr
|
||||||
priv reseeder: Rsdr
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<R: Rng, Rsdr: Reseeder<R>> ReseedingRng<R, Rsdr> {
|
impl<R: Rng, Rsdr: Reseeder<R>> ReseedingRng<R, Rsdr> {
|
||||||
|
|
|
@ -35,7 +35,6 @@ struct RcBox<T> {
|
||||||
#[unsafe_no_drop_flag]
|
#[unsafe_no_drop_flag]
|
||||||
#[no_send]
|
#[no_send]
|
||||||
pub struct Rc<T> {
|
pub struct Rc<T> {
|
||||||
// already priv
|
|
||||||
priv ptr: *mut RcBox<T>
|
priv ptr: *mut RcBox<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +167,6 @@ struct RcMutBox<T> {
|
||||||
#[no_freeze]
|
#[no_freeze]
|
||||||
#[unsafe_no_drop_flag]
|
#[unsafe_no_drop_flag]
|
||||||
pub struct RcMut<T> {
|
pub struct RcMut<T> {
|
||||||
// already priv
|
|
||||||
priv ptr: *mut RcMutBox<T>,
|
priv ptr: *mut RcMutBox<T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ pub fn align(size: uint, align: uint) -> uint {
|
||||||
|
|
||||||
/// Adaptor to wrap around visitors implementing MovePtr.
|
/// Adaptor to wrap around visitors implementing MovePtr.
|
||||||
pub struct MovePtrAdaptor<V> {
|
pub struct MovePtrAdaptor<V> {
|
||||||
// all by reedlepee
|
|
||||||
priv inner: V
|
priv inner: V
|
||||||
}
|
}
|
||||||
pub fn MovePtrAdaptor<V:TyVisitor + MovePtr>(v: V) -> MovePtrAdaptor<V> {
|
pub fn MovePtrAdaptor<V:TyVisitor + MovePtr>(v: V) -> MovePtrAdaptor<V> {
|
||||||
|
|
|
@ -98,7 +98,6 @@ enum VariantState {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct ReprVisitor<'self> {
|
pub struct ReprVisitor<'self> {
|
||||||
// made priv by reedlpee
|
|
||||||
priv ptr: *c_void,
|
priv ptr: *c_void,
|
||||||
priv ptr_stk: ~[*c_void],
|
priv ptr_stk: ~[*c_void],
|
||||||
priv var_stk: ~[VariantState],
|
priv var_stk: ~[VariantState],
|
||||||
|
|
|
@ -29,7 +29,6 @@ static ALL_BITS: uint = FROZEN_BIT | MUT_BIT;
|
||||||
|
|
||||||
#[deriving(Eq)]
|
#[deriving(Eq)]
|
||||||
pub struct BorrowRecord {
|
pub struct BorrowRecord {
|
||||||
// all made byt reedlepee
|
|
||||||
priv box: *mut raw::Box<()>,
|
priv box: *mut raw::Box<()>,
|
||||||
file: *c_char,
|
file: *c_char,
|
||||||
priv line: size_t
|
priv line: size_t
|
||||||
|
|
|
@ -48,14 +48,12 @@ struct Packet<T> {
|
||||||
|
|
||||||
// A one-shot channel.
|
// A one-shot channel.
|
||||||
pub struct ChanOne<T> {
|
pub struct ChanOne<T> {
|
||||||
// all made priv by reeldepee
|
|
||||||
priv void_packet: *mut Void,
|
priv void_packet: *mut Void,
|
||||||
priv suppress_finalize: bool
|
priv suppress_finalize: bool
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A one-shot port.
|
/// A one-shot port.
|
||||||
pub struct PortOne<T> {
|
pub struct PortOne<T> {
|
||||||
// all made priv by reeldepee
|
|
||||||
priv void_packet: *mut Void,
|
priv void_packet: *mut Void,
|
||||||
priv suppress_finalize: bool
|
priv suppress_finalize: bool
|
||||||
}
|
}
|
||||||
|
@ -445,14 +443,12 @@ type StreamPortOne<T> = PortOne<StreamPayload<T>>;
|
||||||
|
|
||||||
/// A channel with unbounded size.
|
/// A channel with unbounded size.
|
||||||
pub struct Chan<T> {
|
pub struct Chan<T> {
|
||||||
// all made priv by reeldepee
|
|
||||||
// FIXME #5372. Using Cell because we don't take &mut self
|
// FIXME #5372. Using Cell because we don't take &mut self
|
||||||
next: Cell<StreamChanOne<T>>
|
next: Cell<StreamChanOne<T>>
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An port with unbounded size.
|
/// An port with unbounded size.
|
||||||
pub struct Port<T> {
|
pub struct Port<T> {
|
||||||
// all made priv by reeldepee
|
|
||||||
// FIXME #5372. Using Cell because we don't take &mut self
|
// FIXME #5372. Using Cell because we don't take &mut self
|
||||||
next: Cell<StreamPortOne<T>>
|
next: Cell<StreamPortOne<T>>
|
||||||
}
|
}
|
||||||
|
@ -581,7 +577,6 @@ impl<'self, T> SelectPortInner<T> for &'self Port<T> {
|
||||||
impl<'self, T> SelectPort<T> for &'self Port<T> { }
|
impl<'self, T> SelectPort<T> for &'self Port<T> { }
|
||||||
|
|
||||||
pub struct SharedChan<T> {
|
pub struct SharedChan<T> {
|
||||||
// already priv
|
|
||||||
// Just like Chan, but a shared AtomicOption instead of Cell
|
// Just like Chan, but a shared AtomicOption instead of Cell
|
||||||
priv next: UnsafeArc<AtomicOption<StreamChanOne<T>>>
|
priv next: UnsafeArc<AtomicOption<StreamChanOne<T>>>
|
||||||
}
|
}
|
||||||
|
@ -635,7 +630,6 @@ impl<T> Clone for SharedChan<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct SharedPort<T> {
|
pub struct SharedPort<T> {
|
||||||
// already priv
|
|
||||||
// The next port on which we will receive the next port on which we will receive T
|
// The next port on which we will receive the next port on which we will receive T
|
||||||
priv next_link: UnsafeArc<AtomicOption<PortOne<StreamPortOne<T>>>>
|
priv next_link: UnsafeArc<AtomicOption<PortOne<StreamPortOne<T>>>>
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,11 @@ use vec::ImmutableVector;
|
||||||
extern {}
|
extern {}
|
||||||
|
|
||||||
pub struct ModEntry<'self> {
|
pub struct ModEntry<'self> {
|
||||||
// made priv by reedlepee
|
|
||||||
name: &'self str,
|
name: &'self str,
|
||||||
log_level: *mut u32
|
log_level: *mut u32
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct CrateMap<'self> {
|
pub struct CrateMap<'self> {
|
||||||
// made priv by reedlepee
|
|
||||||
priv version: i32,
|
priv version: i32,
|
||||||
priv entries: &'self [ModEntry<'self>],
|
priv entries: &'self [ModEntry<'self>],
|
||||||
priv children: &'self [&'self CrateMap<'self>]
|
priv children: &'self [&'self CrateMap<'self>]
|
||||||
|
|
|
@ -64,7 +64,6 @@ static DEFAULT_CAPACITY: uint = 64 * 1024;
|
||||||
|
|
||||||
/// Wraps a Reader and buffers input from it
|
/// Wraps a Reader and buffers input from it
|
||||||
pub struct BufferedReader<R> {
|
pub struct BufferedReader<R> {
|
||||||
// all already priv
|
|
||||||
priv inner: R,
|
priv inner: R,
|
||||||
priv buf: ~[u8],
|
priv buf: ~[u8],
|
||||||
priv pos: uint,
|
priv pos: uint,
|
||||||
|
@ -176,7 +175,6 @@ impl<R: Reader> Decorator<R> for BufferedReader<R> {
|
||||||
///
|
///
|
||||||
/// Note that `BufferedWriter` will NOT flush its buffer when dropped.
|
/// Note that `BufferedWriter` will NOT flush its buffer when dropped.
|
||||||
pub struct BufferedWriter<W> {
|
pub struct BufferedWriter<W> {
|
||||||
// all already priv
|
|
||||||
priv inner: W,
|
priv inner: W,
|
||||||
priv buf: ~[u8],
|
priv buf: ~[u8],
|
||||||
priv pos: uint
|
priv pos: uint
|
||||||
|
@ -252,7 +250,6 @@ impl<W: Reader> Reader for InternalBufferedWriter<W> {
|
||||||
///
|
///
|
||||||
/// Note that `BufferedStream` will NOT flush its output buffer when dropped.
|
/// Note that `BufferedStream` will NOT flush its output buffer when dropped.
|
||||||
pub struct BufferedStream<S> {
|
pub struct BufferedStream<S> {
|
||||||
// all already priv
|
|
||||||
priv inner: BufferedReader<InternalBufferedWriter<S>>
|
priv inner: BufferedReader<InternalBufferedWriter<S>>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -368,7 +368,6 @@ impl<T: Reader> ReaderUtil for T {
|
||||||
/// each call to its `.next()` method.
|
/// each call to its `.next()` method.
|
||||||
/// Yields `None` if the condition is handled.
|
/// Yields `None` if the condition is handled.
|
||||||
pub struct ByteIterator<T> {
|
pub struct ByteIterator<T> {
|
||||||
// all already priv
|
|
||||||
priv reader: T,
|
priv reader: T,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,7 +298,6 @@ pub fn readdir<P: PathLike>(path: &P) -> Option<~[Path]> {
|
||||||
/// Constrained version of `FileStream` that only exposes read-specific operations.
|
/// Constrained version of `FileStream` that only exposes read-specific operations.
|
||||||
///
|
///
|
||||||
/// Can be retreived via `FileInfo.open_reader()`.
|
/// Can be retreived via `FileInfo.open_reader()`.
|
||||||
/// all already priv
|
|
||||||
pub struct FileReader { priv stream: FileStream }
|
pub struct FileReader { priv stream: FileStream }
|
||||||
|
|
||||||
/// a `std::rt::io::Reader` trait impl for file I/O.
|
/// a `std::rt::io::Reader` trait impl for file I/O.
|
||||||
|
@ -326,7 +325,6 @@ impl Seek for FileReader {
|
||||||
/// Constrained version of `FileStream` that only exposes write-specific operations.
|
/// Constrained version of `FileStream` that only exposes write-specific operations.
|
||||||
///
|
///
|
||||||
/// Can be retreived via `FileInfo.open_writer()`.
|
/// Can be retreived via `FileInfo.open_writer()`.
|
||||||
// already priv
|
|
||||||
pub struct FileWriter { priv stream: FileStream }
|
pub struct FileWriter { priv stream: FileStream }
|
||||||
|
|
||||||
/// a `std::rt::io::Writer` trait impl for file I/O.
|
/// a `std::rt::io::Writer` trait impl for file I/O.
|
||||||
|
@ -364,7 +362,6 @@ impl Seek for FileWriter {
|
||||||
/// For this reason, it is best to use the access-constrained wrappers that are
|
/// For this reason, it is best to use the access-constrained wrappers that are
|
||||||
/// exposed via `FileInfo.open_reader()` and `FileInfo.open_writer()`.
|
/// exposed via `FileInfo.open_reader()` and `FileInfo.open_writer()`.
|
||||||
pub struct FileStream {
|
pub struct FileStream {
|
||||||
// all made by reedlepee
|
|
||||||
priv fd: ~RtioFileStream,
|
priv fd: ~RtioFileStream,
|
||||||
priv last_nread: int,
|
priv last_nread: int,
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ use super::*;
|
||||||
|
|
||||||
/// A Writer decorator that compresses using the 'deflate' scheme
|
/// A Writer decorator that compresses using the 'deflate' scheme
|
||||||
pub struct DeflateWriter<W> {
|
pub struct DeflateWriter<W> {
|
||||||
// all made by reedlepee
|
|
||||||
priv inner_writer: W
|
priv inner_writer: W
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +56,6 @@ impl<W: Writer> Decorator<W> for DeflateWriter<W> {
|
||||||
|
|
||||||
/// A Reader decorator that decompresses using the 'deflate' scheme
|
/// A Reader decorator that decompresses using the 'deflate' scheme
|
||||||
pub struct InflateReader<R> {
|
pub struct InflateReader<R> {
|
||||||
// all made by reedlepee
|
|
||||||
priv inner_reader: R
|
priv inner_reader: R
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ use vec;
|
||||||
|
|
||||||
/// Writes to an owned, growable byte vector
|
/// Writes to an owned, growable byte vector
|
||||||
pub struct MemWriter {
|
pub struct MemWriter {
|
||||||
// already priv
|
|
||||||
priv buf: ~[u8]
|
priv buf: ~[u8]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +66,6 @@ impl Decorator<~[u8]> for MemWriter {
|
||||||
|
|
||||||
/// Reads from an owned byte vector
|
/// Reads from an owned byte vector
|
||||||
pub struct MemReader {
|
pub struct MemReader {
|
||||||
// already priv
|
|
||||||
priv buf: ~[u8],
|
priv buf: ~[u8],
|
||||||
priv pos: uint
|
priv pos: uint
|
||||||
}
|
}
|
||||||
|
@ -131,7 +129,6 @@ impl Decorator<~[u8]> for MemReader {
|
||||||
|
|
||||||
/// Writes to a fixed-size byte slice
|
/// Writes to a fixed-size byte slice
|
||||||
pub struct BufWriter<'self> {
|
pub struct BufWriter<'self> {
|
||||||
// already priv
|
|
||||||
priv buf: &'self mut [u8],
|
priv buf: &'self mut [u8],
|
||||||
priv pos: uint
|
priv pos: uint
|
||||||
}
|
}
|
||||||
|
@ -160,7 +157,6 @@ impl<'self> Seek for BufWriter<'self> {
|
||||||
|
|
||||||
/// Reads from a fixed-size byte slice
|
/// Reads from a fixed-size byte slice
|
||||||
pub struct BufReader<'self> {
|
pub struct BufReader<'self> {
|
||||||
// already priv
|
|
||||||
priv buf: &'self [u8],
|
priv buf: &'self [u8],
|
||||||
priv pos: uint
|
priv pos: uint
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@ use option::{Option, None};
|
||||||
use rt::io::{Reader, Writer};
|
use rt::io::{Reader, Writer};
|
||||||
|
|
||||||
pub struct MockReader {
|
pub struct MockReader {
|
||||||
// all made by reedlepee
|
|
||||||
read: ~fn(buf: &mut [u8]) -> Option<uint>,
|
read: ~fn(buf: &mut [u8]) -> Option<uint>,
|
||||||
priv eof: ~fn() -> bool
|
priv eof: ~fn() -> bool
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,7 +341,6 @@ pub static DEFAULT_BUF_SIZE: uint = 1024 * 64;
|
||||||
///
|
///
|
||||||
/// Is something like this sufficient? It's kind of archaic
|
/// Is something like this sufficient? It's kind of archaic
|
||||||
pub struct IoError {
|
pub struct IoError {
|
||||||
// all made by reedlepee
|
|
||||||
kind: IoErrorKind,
|
kind: IoErrorKind,
|
||||||
desc: &'static str,
|
desc: &'static str,
|
||||||
detail: Option<~str>
|
detail: Option<~str>
|
||||||
|
@ -649,7 +648,6 @@ pub enum FileAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct FileStat {
|
pub struct FileStat {
|
||||||
// all made by reedlepee
|
|
||||||
/// A `Path` object containing information about the `PathInfo`'s location
|
/// A `Path` object containing information about the `PathInfo`'s location
|
||||||
path: Path,
|
path: Path,
|
||||||
/// `true` if the file pointed at by the `PathInfo` is a regular file
|
/// `true` if the file pointed at by the `PathInfo` is a regular file
|
||||||
|
|
|
@ -61,7 +61,6 @@ fn keep_going(data: &[u8], f: &fn(*u8, uint) -> i64) -> i64 {
|
||||||
pub type fd_t = libc::c_int;
|
pub type fd_t = libc::c_int;
|
||||||
|
|
||||||
pub struct FileDesc {
|
pub struct FileDesc {
|
||||||
// aleady priv
|
|
||||||
priv fd: fd_t,
|
priv fd: fd_t,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +126,6 @@ impl Drop for FileDesc {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct CFile {
|
pub struct CFile {
|
||||||
// aleady priv
|
|
||||||
priv file: *libc::FILE
|
priv file: *libc::FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ use super::file;
|
||||||
* for the process to terminate.
|
* for the process to terminate.
|
||||||
*/
|
*/
|
||||||
pub struct Process {
|
pub struct Process {
|
||||||
// aleady priv
|
|
||||||
/// The unique id of the process (this should never be negative).
|
/// The unique id of the process (this should never be negative).
|
||||||
priv pid: pid_t,
|
priv pid: pid_t,
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ pub fn println(s: &str) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct StdIn {
|
pub struct StdIn {
|
||||||
// aleady priv
|
|
||||||
priv fd: file::FileDesc
|
priv fd: file::FileDesc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +49,6 @@ impl Reader for StdIn {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct StdOut {
|
pub struct StdOut {
|
||||||
// aleady priv
|
|
||||||
priv fd: file::FileDesc
|
priv fd: file::FileDesc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,6 @@ impl ToStr for IpAddr {
|
||||||
|
|
||||||
#[deriving(Eq, TotalEq, Clone)]
|
#[deriving(Eq, TotalEq, Clone)]
|
||||||
pub struct SocketAddr {
|
pub struct SocketAddr {
|
||||||
// all made by reedlpee
|
|
||||||
ip: IpAddr,
|
ip: IpAddr,
|
||||||
port: Port,
|
port: Port,
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ use rt::rtio::{IoFactory, IoFactoryObject,
|
||||||
use rt::local::Local;
|
use rt::local::Local;
|
||||||
|
|
||||||
pub struct TcpStream {
|
pub struct TcpStream {
|
||||||
// aleady priv
|
|
||||||
priv obj: ~RtioTcpStreamObject
|
priv obj: ~RtioTcpStreamObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +99,6 @@ impl Writer for TcpStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TcpListener {
|
pub struct TcpListener {
|
||||||
// aleady priv
|
|
||||||
priv obj: ~RtioTcpListenerObject
|
priv obj: ~RtioTcpListenerObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +142,6 @@ impl Listener<TcpStream, TcpAcceptor> for TcpListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TcpAcceptor {
|
pub struct TcpAcceptor {
|
||||||
// aleady priv
|
|
||||||
priv obj: ~RtioTcpAcceptorObject
|
priv obj: ~RtioTcpAcceptorObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ use rt::rtio::{RtioSocket, RtioUdpSocketObject, RtioUdpSocket, IoFactory, IoFact
|
||||||
use rt::local::Local;
|
use rt::local::Local;
|
||||||
|
|
||||||
pub struct UdpSocket {
|
pub struct UdpSocket {
|
||||||
// aleady priv
|
|
||||||
priv obj: ~RtioUdpSocketObject
|
priv obj: ~RtioUdpSocketObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +72,6 @@ impl UdpSocket {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UdpStream {
|
pub struct UdpStream {
|
||||||
// aleady priv
|
|
||||||
priv socket: UdpSocket,
|
priv socket: UdpSocket,
|
||||||
priv connectedTo: SocketAddr
|
priv connectedTo: SocketAddr
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ use rt::rtio::{RtioPipe, RtioPipeObject, IoFactoryObject, IoFactory};
|
||||||
use rt::rtio::RtioUnboundPipeObject;
|
use rt::rtio::RtioUnboundPipeObject;
|
||||||
|
|
||||||
pub struct PipeStream {
|
pub struct PipeStream {
|
||||||
// already priv
|
|
||||||
priv obj: RtioPipeObject
|
priv obj: RtioPipeObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,16 +26,13 @@ use rt::rtio::{RtioProcess, RtioProcessObject, IoFactoryObject, IoFactory};
|
||||||
#[cfg(not(windows))] pub static MustDieSignal: int = libc::SIGKILL as int;
|
#[cfg(not(windows))] pub static MustDieSignal: int = libc::SIGKILL as int;
|
||||||
|
|
||||||
pub struct Process {
|
pub struct Process {
|
||||||
// already priv
|
|
||||||
priv handle: ~RtioProcessObject,
|
priv handle: ~RtioProcessObject,
|
||||||
// made by reedlepee
|
|
||||||
io: ~[Option<io::PipeStream>],
|
io: ~[Option<io::PipeStream>],
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This configuration describes how a new process should be spawned. This is
|
/// This configuration describes how a new process should be spawned. This is
|
||||||
/// translated to libuv's own configuration
|
/// translated to libuv's own configuration
|
||||||
pub struct ProcessConfig<'self> {
|
pub struct ProcessConfig<'self> {
|
||||||
// all made by reedlepee
|
|
||||||
/// Path to the program to run
|
/// Path to the program to run
|
||||||
program: &'self str,
|
program: &'self str,
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,6 @@ pub fn println_args(fmt: &fmt::Arguments) {
|
||||||
|
|
||||||
/// Representation of a reader of a standard input stream
|
/// Representation of a reader of a standard input stream
|
||||||
pub struct StdReader {
|
pub struct StdReader {
|
||||||
// aleady priv
|
|
||||||
priv inner: ~RtioFileStream
|
priv inner: ~RtioFileStream
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +106,6 @@ impl Reader for StdReader {
|
||||||
|
|
||||||
/// Representation of a writer to a standard output stream
|
/// Representation of a writer to a standard output stream
|
||||||
pub struct StdWriter {
|
pub struct StdWriter {
|
||||||
// aleady priv
|
|
||||||
priv inner: ~RtioFileStream
|
priv inner: ~RtioFileStream
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ use rt::rtio::{IoFactory, IoFactoryObject,
|
||||||
use rt::local::Local;
|
use rt::local::Local;
|
||||||
|
|
||||||
pub struct Timer {
|
pub struct Timer {
|
||||||
// aleady priv
|
|
||||||
priv obj: ~RtioTimerObject
|
priv obj: ~RtioTimerObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,6 @@ pub struct KillHandle(UnsafeArc<KillHandleInner>);
|
||||||
|
|
||||||
/// Per-task state related to task death, killing, failure, etc.
|
/// Per-task state related to task death, killing, failure, etc.
|
||||||
pub struct Death {
|
pub struct Death {
|
||||||
// all made priv by reedlepee
|
|
||||||
// Shared among this task, its watched children, and any linked tasks who
|
// Shared among this task, its watched children, and any linked tasks who
|
||||||
// might kill it. This is optional so we can take it by-value at exit time.
|
// might kill it. This is optional so we can take it by-value at exit time.
|
||||||
kill_handle: Option<KillHandle>,
|
kill_handle: Option<KillHandle>,
|
||||||
|
|
|
@ -32,7 +32,6 @@ pub type OpaqueBox = c_void;
|
||||||
pub type TypeDesc = c_void;
|
pub type TypeDesc = c_void;
|
||||||
|
|
||||||
pub struct LocalHeap {
|
pub struct LocalHeap {
|
||||||
// all made by reedlepee
|
|
||||||
priv memory_region: *MemoryRegion,
|
priv memory_region: *MemoryRegion,
|
||||||
priv boxed_region: *BoxedRegion
|
priv boxed_region: *BoxedRegion
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ use unstable::sync::{UnsafeArc, LittleLock};
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
|
|
||||||
pub struct MessageQueue<T> {
|
pub struct MessageQueue<T> {
|
||||||
// already priv
|
|
||||||
priv state: UnsafeArc<State<T>>
|
priv state: UnsafeArc<State<T>>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ use libc::c_void;
|
||||||
use cast;
|
use cast;
|
||||||
|
|
||||||
pub struct RC<T> {
|
pub struct RC<T> {
|
||||||
// all made priv by reedlepe
|
|
||||||
priv p: *c_void // ~(uint, T)
|
priv p: *c_void // ~(uint, T)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,6 @@ pub trait RemoteCallback {
|
||||||
/// Using unix flag conventions for now, which happens to also be what's supported
|
/// Using unix flag conventions for now, which happens to also be what's supported
|
||||||
/// libuv (it does translation to windows under the hood).
|
/// libuv (it does translation to windows under the hood).
|
||||||
pub struct FileOpenConfig {
|
pub struct FileOpenConfig {
|
||||||
// all made by reedlepe
|
|
||||||
/// Path to file to be opened
|
/// Path to file to be opened
|
||||||
path: Path,
|
path: Path,
|
||||||
/// Flags for file access mode (as per open(2))
|
/// Flags for file access mode (as per open(2))
|
||||||
|
|
|
@ -40,7 +40,6 @@ use vec::{OwnedVector};
|
||||||
/// in too much allocation and too many events.
|
/// in too much allocation and too many events.
|
||||||
pub struct Scheduler {
|
pub struct Scheduler {
|
||||||
/// There are N work queues, one per scheduler.
|
/// There are N work queues, one per scheduler.
|
||||||
// already priv
|
|
||||||
work_queue: WorkQueue<~Task>,
|
work_queue: WorkQueue<~Task>,
|
||||||
/// Work queues for the other schedulers. These are created by
|
/// Work queues for the other schedulers. These are created by
|
||||||
/// cloning the core work queues.
|
/// cloning the core work queues.
|
||||||
|
@ -48,7 +47,6 @@ pub struct Scheduler {
|
||||||
/// The queue of incoming messages from other schedulers.
|
/// The queue of incoming messages from other schedulers.
|
||||||
/// These are enqueued by SchedHandles after which a remote callback
|
/// These are enqueued by SchedHandles after which a remote callback
|
||||||
/// is triggered to handle the message.
|
/// is triggered to handle the message.
|
||||||
// already priv
|
|
||||||
priv message_queue: MessageQueue<SchedMessage>,
|
priv message_queue: MessageQueue<SchedMessage>,
|
||||||
/// A shared list of sleeping schedulers. We'll use this to wake
|
/// A shared list of sleeping schedulers. We'll use this to wake
|
||||||
/// up schedulers when pushing work onto the work queue.
|
/// up schedulers when pushing work onto the work queue.
|
||||||
|
@ -59,7 +57,6 @@ pub struct Scheduler {
|
||||||
/// not active since there are multiple event sources that may
|
/// not active since there are multiple event sources that may
|
||||||
/// wake the scheduler. It just prevents the scheduler from pushing
|
/// wake the scheduler. It just prevents the scheduler from pushing
|
||||||
/// multiple handles onto the sleeper list.
|
/// multiple handles onto the sleeper list.
|
||||||
// already priv
|
|
||||||
priv sleepy: bool,
|
priv sleepy: bool,
|
||||||
/// A flag to indicate we've received the shutdown message and should
|
/// A flag to indicate we've received the shutdown message and should
|
||||||
/// no longer try to go to sleep, but exit instead.
|
/// no longer try to go to sleep, but exit instead.
|
||||||
|
@ -796,10 +793,8 @@ pub enum SchedMessage {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct SchedHandle {
|
pub struct SchedHandle {
|
||||||
//already priv
|
|
||||||
priv remote: ~RemoteCallbackObject,
|
priv remote: ~RemoteCallbackObject,
|
||||||
priv queue: MessageQueue<SchedMessage>,
|
priv queue: MessageQueue<SchedMessage>,
|
||||||
// made by reedlepee
|
|
||||||
sched_id: uint
|
sched_id: uint
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ use rt::sched::SchedHandle;
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
|
|
||||||
pub struct SleeperList {
|
pub struct SleeperList {
|
||||||
// already priv
|
|
||||||
priv state: UnsafeArc<State>
|
priv state: UnsafeArc<State>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ use ops::Drop;
|
||||||
use libc::{c_uint, uintptr_t};
|
use libc::{c_uint, uintptr_t};
|
||||||
|
|
||||||
pub struct StackSegment {
|
pub struct StackSegment {
|
||||||
// all made by reedlepee
|
|
||||||
priv buf: ~[u8],
|
priv buf: ~[u8],
|
||||||
priv valgrind_id: c_uint
|
priv valgrind_id: c_uint
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,6 @@ use send_str::SendStr;
|
||||||
// the type-specific state.
|
// the type-specific state.
|
||||||
|
|
||||||
pub struct Task {
|
pub struct Task {
|
||||||
//all priv made br reedlepe
|
|
||||||
heap: LocalHeap,
|
heap: LocalHeap,
|
||||||
priv gc: GarbageCollector,
|
priv gc: GarbageCollector,
|
||||||
storage: LocalStorage,
|
storage: LocalStorage,
|
||||||
|
@ -57,7 +56,6 @@ pub struct Task {
|
||||||
sched: Option<~Scheduler>,
|
sched: Option<~Scheduler>,
|
||||||
task_type: TaskType,
|
task_type: TaskType,
|
||||||
// Dynamic borrowck debugging info
|
// Dynamic borrowck debugging info
|
||||||
// should be public
|
|
||||||
borrow_list: Option<~[BorrowRecord]>
|
borrow_list: Option<~[BorrowRecord]>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +69,6 @@ pub struct Coroutine {
|
||||||
/// The segment of stack on which the task is currently running or
|
/// The segment of stack on which the task is currently running or
|
||||||
/// if the task is blocked, on which the task will resume
|
/// if the task is blocked, on which the task will resume
|
||||||
/// execution.
|
/// execution.
|
||||||
//all priv made br reedlepe
|
|
||||||
priv current_stack_segment: StackSegment,
|
priv current_stack_segment: StackSegment,
|
||||||
/// Always valid if the task is alive and not running.
|
/// Always valid if the task is alive and not running.
|
||||||
saved_context: Context
|
saved_context: Context
|
||||||
|
@ -87,7 +84,6 @@ pub struct GarbageCollector;
|
||||||
pub struct LocalStorage(Option<local_data::Map>);
|
pub struct LocalStorage(Option<local_data::Map>);
|
||||||
|
|
||||||
pub struct Unwinder {
|
pub struct Unwinder {
|
||||||
//all priv made br reedlepe
|
|
||||||
unwinding: bool,
|
unwinding: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ struct TubeState<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Tube<T> {
|
pub struct Tube<T> {
|
||||||
//all priv made br reedlepe
|
|
||||||
priv p: RC<TubeState<T>>
|
priv p: RC<TubeState<T>>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ type GetAddrInfoCallback = ~fn(GetAddrInfoRequest, &UvAddrInfo, Option<UvError>)
|
||||||
pub struct GetAddrInfoRequest(*uvll::uv_getaddrinfo_t);
|
pub struct GetAddrInfoRequest(*uvll::uv_getaddrinfo_t);
|
||||||
|
|
||||||
pub struct RequestData {
|
pub struct RequestData {
|
||||||
// all made by reedlepee
|
|
||||||
priv getaddrinfo_cb: Option<GetAddrInfoCallback>,
|
priv getaddrinfo_cb: Option<GetAddrInfoCallback>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ pub struct FsRequest(*uvll::uv_fs_t);
|
||||||
impl Request for FsRequest {}
|
impl Request for FsRequest {}
|
||||||
|
|
||||||
pub struct RequestData {
|
pub struct RequestData {
|
||||||
// all made by reedlepee
|
|
||||||
priv complete_cb: Option<FsCallback>
|
priv complete_cb: Option<FsCallback>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,6 @@ pub mod pipe;
|
||||||
/// with dtors may not be destructured, but tuple structs can,
|
/// with dtors may not be destructured, but tuple structs can,
|
||||||
/// but the results are not correct.
|
/// but the results are not correct.
|
||||||
pub struct Loop {
|
pub struct Loop {
|
||||||
// all made by reedlepee
|
|
||||||
priv handle: *uvll::uv_loop_t
|
priv handle: *uvll::uv_loop_t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,6 @@ fn socket_name<T, U: Watcher + NativeHandle<*T>>(sk: SocketNameKind,
|
||||||
|
|
||||||
// Obviously an Event Loop is always home.
|
// Obviously an Event Loop is always home.
|
||||||
pub struct UvEventLoop {
|
pub struct UvEventLoop {
|
||||||
// all made by reedlepee
|
|
||||||
priv uvio: UvIoFactory
|
priv uvio: UvIoFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +240,6 @@ impl EventLoop for UvEventLoop {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvPausibleIdleCallback {
|
pub struct UvPausibleIdleCallback {
|
||||||
// all made by reedlepee
|
|
||||||
priv watcher: IdleWatcher,
|
priv watcher: IdleWatcher,
|
||||||
priv idle_flag: bool,
|
priv idle_flag: bool,
|
||||||
priv closed: bool
|
priv closed: bool
|
||||||
|
@ -295,7 +293,6 @@ fn test_callback_run_once() {
|
||||||
|
|
||||||
// The entire point of async is to call into a loop from other threads so it does not need to home.
|
// The entire point of async is to call into a loop from other threads so it does not need to home.
|
||||||
pub struct UvRemoteCallback {
|
pub struct UvRemoteCallback {
|
||||||
// all made by reedlepee
|
|
||||||
// The uv async handle for triggering the callback
|
// The uv async handle for triggering the callback
|
||||||
priv async: AsyncWatcher,
|
priv async: AsyncWatcher,
|
||||||
// A flag to tell the callback to exit, set from the dtor. This is
|
// A flag to tell the callback to exit, set from the dtor. This is
|
||||||
|
@ -804,7 +801,6 @@ impl IoFactory for UvIoFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvTcpListener {
|
pub struct UvTcpListener {
|
||||||
// all made by reedlepee
|
|
||||||
priv watcher : TcpWatcher,
|
priv watcher : TcpWatcher,
|
||||||
priv home: SchedHandle,
|
priv home: SchedHandle,
|
||||||
}
|
}
|
||||||
|
@ -867,7 +863,6 @@ impl RtioTcpListener for UvTcpListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvTcpAcceptor {
|
pub struct UvTcpAcceptor {
|
||||||
// all made by reedlepee
|
|
||||||
priv listener: UvTcpListener,
|
priv listener: UvTcpListener,
|
||||||
priv incoming: Tube<Result<~RtioTcpStreamObject, IoError>>,
|
priv incoming: Tube<Result<~RtioTcpStreamObject, IoError>>,
|
||||||
}
|
}
|
||||||
|
@ -992,7 +987,6 @@ fn write_stream(mut watcher: StreamWatcher,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvUnboundPipe {
|
pub struct UvUnboundPipe {
|
||||||
// all made by reedlepee
|
|
||||||
pipe: Pipe,
|
pipe: Pipe,
|
||||||
priv home: SchedHandle,
|
priv home: SchedHandle,
|
||||||
}
|
}
|
||||||
|
@ -1023,7 +1017,6 @@ impl UvUnboundPipe {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvPipeStream {
|
pub struct UvPipeStream {
|
||||||
// already
|
|
||||||
priv inner: ~UvUnboundPipe,
|
priv inner: ~UvUnboundPipe,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1047,7 +1040,6 @@ impl RtioPipe for UvPipeStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvTcpStream {
|
pub struct UvTcpStream {
|
||||||
// all made by reedlepee
|
|
||||||
priv watcher: TcpWatcher,
|
priv watcher: TcpWatcher,
|
||||||
priv home: SchedHandle,
|
priv home: SchedHandle,
|
||||||
}
|
}
|
||||||
|
@ -1148,7 +1140,6 @@ impl RtioTcpStream for UvTcpStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvUdpSocket {
|
pub struct UvUdpSocket {
|
||||||
// all made by reedelpee
|
|
||||||
priv watcher: UdpWatcher,
|
priv watcher: UdpWatcher,
|
||||||
priv home: SchedHandle,
|
priv home: SchedHandle,
|
||||||
}
|
}
|
||||||
|
@ -1359,7 +1350,6 @@ impl RtioUdpSocket for UvUdpSocket {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvTimer {
|
pub struct UvTimer {
|
||||||
// all made by reedelpee
|
|
||||||
priv watcher: timer::TimerWatcher,
|
priv watcher: timer::TimerWatcher,
|
||||||
priv home: SchedHandle,
|
priv home: SchedHandle,
|
||||||
}
|
}
|
||||||
|
@ -1407,7 +1397,6 @@ impl RtioTimer for UvTimer {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvFileStream {
|
pub struct UvFileStream {
|
||||||
// all made by reedelpee
|
|
||||||
priv loop_: Loop,
|
priv loop_: Loop,
|
||||||
priv fd: c_int,
|
priv fd: c_int,
|
||||||
priv close_on_drop: bool,
|
priv close_on_drop: bool,
|
||||||
|
@ -1541,7 +1530,6 @@ impl RtioFileStream for UvFileStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UvProcess {
|
pub struct UvProcess {
|
||||||
// two made by reedelpee
|
|
||||||
priv process: process::Process,
|
priv process: process::Process,
|
||||||
|
|
||||||
// Sadly, this structure must be created before we return it, so in that
|
// Sadly, this structure must be created before we return it, so in that
|
||||||
|
@ -1549,7 +1537,6 @@ pub struct UvProcess {
|
||||||
priv home: Option<SchedHandle>,
|
priv home: Option<SchedHandle>,
|
||||||
|
|
||||||
// All None until the process exits (exit_error may stay None)
|
// All None until the process exits (exit_error may stay None)
|
||||||
// Rest were already priv
|
|
||||||
priv exit_status: Option<int>,
|
priv exit_status: Option<int>,
|
||||||
priv term_signal: Option<int>,
|
priv term_signal: Option<int>,
|
||||||
priv exit_error: Option<UvError>,
|
priv exit_error: Option<UvError>,
|
||||||
|
|
|
@ -84,7 +84,6 @@ pub static STDIO_WRITABLE_PIPE: c_int = 0x20;
|
||||||
// see libuv/include/uv-unix.h
|
// see libuv/include/uv-unix.h
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
pub struct uv_buf_t {
|
pub struct uv_buf_t {
|
||||||
// all made by reedelpee
|
|
||||||
base: *u8,
|
base: *u8,
|
||||||
len: libc::size_t,
|
len: libc::size_t,
|
||||||
}
|
}
|
||||||
|
@ -92,13 +91,11 @@ pub struct uv_buf_t {
|
||||||
// see libuv/include/uv-win.h
|
// see libuv/include/uv-win.h
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
pub struct uv_buf_t {
|
pub struct uv_buf_t {
|
||||||
// all made by reedelpee
|
|
||||||
len: u32,
|
len: u32,
|
||||||
base: *u8,
|
base: *u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct uv_process_options_t {
|
pub struct uv_process_options_t {
|
||||||
// all made by reedelpee
|
|
||||||
exit_cb: uv_exit_cb,
|
exit_cb: uv_exit_cb,
|
||||||
file: *libc::c_char,
|
file: *libc::c_char,
|
||||||
args: **libc::c_char,
|
args: **libc::c_char,
|
||||||
|
@ -114,7 +111,6 @@ pub struct uv_process_options_t {
|
||||||
// These fields are private because they must be interfaced with through the
|
// These fields are private because they must be interfaced with through the
|
||||||
// functions below.
|
// functions below.
|
||||||
pub struct uv_stdio_container_t {
|
pub struct uv_stdio_container_t {
|
||||||
// already priv
|
|
||||||
priv flags: libc::c_int,
|
priv flags: libc::c_int,
|
||||||
priv stream: *uv_stream_t,
|
priv stream: *uv_stream_t,
|
||||||
}
|
}
|
||||||
|
@ -137,13 +133,11 @@ pub type uv_process_t = c_void;
|
||||||
pub type uv_pipe_t = c_void;
|
pub type uv_pipe_t = c_void;
|
||||||
|
|
||||||
pub struct uv_timespec_t {
|
pub struct uv_timespec_t {
|
||||||
// all made by reedelpee
|
|
||||||
tv_sec: libc::c_long,
|
tv_sec: libc::c_long,
|
||||||
priv tv_nsec: libc::c_long
|
priv tv_nsec: libc::c_long
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct uv_stat_t {
|
pub struct uv_stat_t {
|
||||||
// all made by reedelpee
|
|
||||||
priv st_dev: libc::uint64_t,
|
priv st_dev: libc::uint64_t,
|
||||||
st_mode: libc::uint64_t,
|
st_mode: libc::uint64_t,
|
||||||
priv st_nlink: libc::uint64_t,
|
priv st_nlink: libc::uint64_t,
|
||||||
|
@ -237,7 +231,6 @@ pub type socklen_t = c_int;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
pub struct addrinfo {
|
pub struct addrinfo {
|
||||||
// all made by reedelpee
|
|
||||||
priv ai_flags: c_int,
|
priv ai_flags: c_int,
|
||||||
priv ai_family: c_int,
|
priv ai_family: c_int,
|
||||||
priv ai_socktype: c_int,
|
priv ai_socktype: c_int,
|
||||||
|
@ -251,7 +244,6 @@ pub struct addrinfo {
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
#[cfg(target_os = "freebsd")]
|
#[cfg(target_os = "freebsd")]
|
||||||
pub struct addrinfo {
|
pub struct addrinfo {
|
||||||
// all made by reedelpee
|
|
||||||
priv ai_flags: c_int,
|
priv ai_flags: c_int,
|
||||||
priv ai_family: c_int,
|
priv ai_family: c_int,
|
||||||
priv ai_socktype: c_int,
|
priv ai_socktype: c_int,
|
||||||
|
@ -264,7 +256,6 @@ pub struct addrinfo {
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
pub struct addrinfo {
|
pub struct addrinfo {
|
||||||
// all made by reedelpee
|
|
||||||
priv ai_flags: c_int,
|
priv ai_flags: c_int,
|
||||||
priv ai_family: c_int,
|
priv ai_family: c_int,
|
||||||
priv ai_socktype: c_int,
|
priv ai_socktype: c_int,
|
||||||
|
@ -272,7 +263,7 @@ pub struct addrinfo {
|
||||||
priv ai_addrlen: size_t,
|
priv ai_addrlen: size_t,
|
||||||
priv ai_canonname: *char,
|
priv ai_canonname: *char,
|
||||||
ai_addr: *sockaddr,
|
ai_addr: *sockaddr,
|
||||||
priv vai_next: *addrinfo
|
priv ai_next: *addrinfo
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(unix)] pub type uv_uid_t = libc::types::os::arch::posix88::uid_t;
|
#[cfg(unix)] pub type uv_uid_t = libc::types::os::arch::posix88::uid_t;
|
||||||
|
@ -969,7 +960,6 @@ pub unsafe fn freeaddrinfo(ai: *addrinfo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct uv_err_data {
|
pub struct uv_err_data {
|
||||||
// all made by reedelpee
|
|
||||||
priv err_name: ~str,
|
priv err_name: ~str,
|
||||||
priv err_msg: ~str,
|
priv err_msg: ~str,
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ use kinds::Send;
|
||||||
use clone::Clone;
|
use clone::Clone;
|
||||||
|
|
||||||
pub struct WorkQueue<T> {
|
pub struct WorkQueue<T> {
|
||||||
// already priv
|
|
||||||
// XXX: Another mystery bug fixed by boxing this lock
|
// XXX: Another mystery bug fixed by boxing this lock
|
||||||
priv queue: ~Exclusive<~[T]>
|
priv queue: ~Exclusive<~[T]>
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,13 +29,11 @@ use task;
|
||||||
* for the process to terminate.
|
* for the process to terminate.
|
||||||
*/
|
*/
|
||||||
pub struct Process {
|
pub struct Process {
|
||||||
// already priv
|
|
||||||
priv inner: process::Process,
|
priv inner: process::Process,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Options that can be given when starting a Process.
|
/// Options that can be given when starting a Process.
|
||||||
pub struct ProcessOptions<'self> {
|
pub struct ProcessOptions<'self> {
|
||||||
// All were made priv by reedlepee
|
|
||||||
/**
|
/**
|
||||||
* If this is None then the new process will have the same initial
|
* If this is None then the new process will have the same initial
|
||||||
* environment as the parent process.
|
* environment as the parent process.
|
||||||
|
@ -100,7 +98,6 @@ impl <'self> ProcessOptions<'self> {
|
||||||
|
|
||||||
/// The output of a finished process.
|
/// The output of a finished process.
|
||||||
pub struct ProcessOutput {
|
pub struct ProcessOutput {
|
||||||
/// made priv by reedlepee
|
|
||||||
/// The status (exit code) of the process.
|
/// The status (exit code) of the process.
|
||||||
status: int,
|
status: int,
|
||||||
|
|
||||||
|
|
|
@ -355,7 +355,6 @@ Section: Iterators
|
||||||
/// Use with the `std::iterator` module.
|
/// Use with the `std::iterator` module.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct CharIterator<'self> {
|
pub struct CharIterator<'self> {
|
||||||
// already priv
|
|
||||||
/// The slice remaining to be iterated
|
/// The slice remaining to be iterated
|
||||||
priv string: &'self str,
|
priv string: &'self str,
|
||||||
}
|
}
|
||||||
|
@ -401,7 +400,6 @@ impl<'self> DoubleEndedIterator<char> for CharIterator<'self> {
|
||||||
/// Use with the `std::iterator` module.
|
/// Use with the `std::iterator` module.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct CharOffsetIterator<'self> {
|
pub struct CharOffsetIterator<'self> {
|
||||||
// already priv
|
|
||||||
/// The original string to be iterated
|
/// The original string to be iterated
|
||||||
priv string: &'self str,
|
priv string: &'self str,
|
||||||
priv iter: CharIterator<'self>,
|
priv iter: CharIterator<'self>,
|
||||||
|
@ -460,7 +458,6 @@ pub type ByteRevIterator<'self> = Invert<ByteIterator<'self>>;
|
||||||
/// An iterator over the substrings of a string, separated by `sep`.
|
/// An iterator over the substrings of a string, separated by `sep`.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct CharSplitIterator<'self, Sep> {
|
pub struct CharSplitIterator<'self, Sep> {
|
||||||
// already priv
|
|
||||||
/// The slice remaining to be iterated
|
/// The slice remaining to be iterated
|
||||||
priv string: &'self str,
|
priv string: &'self str,
|
||||||
priv sep: Sep,
|
priv sep: Sep,
|
||||||
|
@ -478,7 +475,6 @@ pub type CharRSplitIterator<'self, Sep> = Invert<CharSplitIterator<'self, Sep>>;
|
||||||
/// splitting at most `count` times.
|
/// splitting at most `count` times.
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct CharSplitNIterator<'self, Sep> {
|
pub struct CharSplitNIterator<'self, Sep> {
|
||||||
// already priv
|
|
||||||
priv iter: CharSplitIterator<'self, Sep>,
|
priv iter: CharSplitIterator<'self, Sep>,
|
||||||
/// The number of splits remaining
|
/// The number of splits remaining
|
||||||
priv count: uint,
|
priv count: uint,
|
||||||
|
@ -595,7 +591,6 @@ impl<'self, Sep: CharEq> Iterator<&'self str> for CharSplitNIterator<'self, Sep>
|
||||||
/// substring within a larger string
|
/// substring within a larger string
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct MatchesIndexIterator<'self> {
|
pub struct MatchesIndexIterator<'self> {
|
||||||
// already priv
|
|
||||||
priv haystack: &'self str,
|
priv haystack: &'self str,
|
||||||
priv needle: &'self str,
|
priv needle: &'self str,
|
||||||
priv position: uint,
|
priv position: uint,
|
||||||
|
@ -605,7 +600,6 @@ pub struct MatchesIndexIterator<'self> {
|
||||||
/// search string
|
/// search string
|
||||||
#[deriving(Clone)]
|
#[deriving(Clone)]
|
||||||
pub struct StrSplitIterator<'self> {
|
pub struct StrSplitIterator<'self> {
|
||||||
// already priv
|
|
||||||
priv it: MatchesIndexIterator<'self>,
|
priv it: MatchesIndexIterator<'self>,
|
||||||
priv last_end: uint,
|
priv last_end: uint,
|
||||||
priv finished: bool
|
priv finished: bool
|
||||||
|
@ -1005,7 +999,6 @@ pub struct CharRange {
|
||||||
/// Current `char`
|
/// Current `char`
|
||||||
/// This field should be public making it private causes error while compiling!!
|
/// This field should be public making it private causes error while compiling!!
|
||||||
ch: char,
|
ch: char,
|
||||||
// made by reedlepee
|
|
||||||
/// Index of the first byte of the next `char`
|
/// Index of the first byte of the next `char`
|
||||||
next: uint
|
next: uint
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue