about summary refs log tree commit diff
path: root/src/libstd/rt/io
diff options
context:
space:
mode:
authorreedlepee <reedlepee123@gmail.com>2013-10-20 06:03:09 +0530
committerreedlepee <reedlepee123@gmail.com>2013-10-23 01:10:50 +0530
commit0ada7c7ffe453b9df849996f8dca0b8d0f2d9e62 (patch)
tree6f1dc6e0c50e81caacfcb5cef1a9543d9442e87e /src/libstd/rt/io
parentdadb6f0cd9fa7e4b402a0107358acb34002d4895 (diff)
downloadrust-0ada7c7ffe453b9df849996f8dca0b8d0f2d9e62.tar.gz
rust-0ada7c7ffe453b9df849996f8dca0b8d0f2d9e62.zip
Making fields in std and extra : private #4386
Diffstat (limited to 'src/libstd/rt/io')
-rw-r--r--src/libstd/rt/io/buffered.rs3
-rw-r--r--src/libstd/rt/io/extensions.rs1
-rw-r--r--src/libstd/rt/io/file.rs7
-rw-r--r--src/libstd/rt/io/flate.rs6
-rw-r--r--src/libstd/rt/io/mem.rs4
-rw-r--r--src/libstd/rt/io/mock.rs7
-rw-r--r--src/libstd/rt/io/mod.rs2
-rw-r--r--src/libstd/rt/io/native/file.rs2
-rw-r--r--src/libstd/rt/io/native/process.rs1
-rw-r--r--src/libstd/rt/io/native/stdio.rs2
-rw-r--r--src/libstd/rt/io/net/ip.rs1
-rw-r--r--src/libstd/rt/io/net/tcp.rs3
-rw-r--r--src/libstd/rt/io/net/udp.rs2
-rw-r--r--src/libstd/rt/io/pipe.rs1
-rw-r--r--src/libstd/rt/io/process.rs3
-rw-r--r--src/libstd/rt/io/stdio.rs2
-rw-r--r--src/libstd/rt/io/timer.rs1
17 files changed, 41 insertions, 7 deletions
diff --git a/src/libstd/rt/io/buffered.rs b/src/libstd/rt/io/buffered.rs
index 9dcb35c806f..a33892736b0 100644
--- a/src/libstd/rt/io/buffered.rs
+++ b/src/libstd/rt/io/buffered.rs
@@ -64,6 +64,7 @@ static DEFAULT_CAPACITY: uint = 64 * 1024;
 
 /// Wraps a Reader and buffers input from it
 pub struct BufferedReader<R> {
+    // all already priv
     priv inner: R,
     priv buf: ~[u8],
     priv pos: uint,
@@ -175,6 +176,7 @@ impl<R: Reader> Decorator<R> for BufferedReader<R> {
 ///
 /// Note that `BufferedWriter` will NOT flush its buffer when dropped.
 pub struct BufferedWriter<W> {
+    // all already priv
     priv inner: W,
     priv buf: ~[u8],
     priv pos: uint
@@ -250,6 +252,7 @@ impl<W: Reader> Reader for InternalBufferedWriter<W> {
 ///
 /// Note that `BufferedStream` will NOT flush its output buffer when dropped.
 pub struct BufferedStream<S> {
+    // all already priv
     priv inner: BufferedReader<InternalBufferedWriter<S>>
 }
 
diff --git a/src/libstd/rt/io/extensions.rs b/src/libstd/rt/io/extensions.rs
index 99634b532b0..5a3524195c7 100644
--- a/src/libstd/rt/io/extensions.rs
+++ b/src/libstd/rt/io/extensions.rs
@@ -368,6 +368,7 @@ impl<T: Reader> ReaderUtil for T {
 /// each call to its `.next()` method.
 /// Yields `None` if the condition is handled.
 pub struct ByteIterator<T> {
+    // all already priv
     priv reader: T,
 }
 
diff --git a/src/libstd/rt/io/file.rs b/src/libstd/rt/io/file.rs
index a5d593d2454..9d633ec1c65 100644
--- a/src/libstd/rt/io/file.rs
+++ b/src/libstd/rt/io/file.rs
@@ -298,6 +298,7 @@ pub fn readdir<P: PathLike>(path: &P) -> Option<~[Path]> {
 /// Constrained version of `FileStream` that only exposes read-specific operations.
 ///
 /// Can be retreived via `FileInfo.open_reader()`.
+/// all already priv
 pub struct FileReader { priv stream: FileStream }
 
 /// a `std::rt::io::Reader` trait impl for file I/O.
@@ -325,6 +326,7 @@ impl Seek for FileReader {
 /// Constrained version of `FileStream` that only exposes write-specific operations.
 ///
 /// Can be retreived via `FileInfo.open_writer()`.
+// already priv
 pub struct FileWriter { priv stream: FileStream }
 
 /// a `std::rt::io::Writer` trait impl for file I/O.
@@ -362,8 +364,9 @@ impl Seek for FileWriter {
 /// For this reason, it is best to use the access-constrained wrappers that are
 /// exposed via `FileInfo.open_reader()` and `FileInfo.open_writer()`.
 pub struct FileStream {
-    fd: ~RtioFileStream,
-    last_nread: int,
+    // all made by reedlepee
+    priv fd: ~RtioFileStream,
+    priv last_nread: int,
 }
 
 /// a `std::rt::io::Reader` trait impl for file I/O.
diff --git a/src/libstd/rt/io/flate.rs b/src/libstd/rt/io/flate.rs
index 7c72ce6ba89..9c49f2afb1e 100644
--- a/src/libstd/rt/io/flate.rs
+++ b/src/libstd/rt/io/flate.rs
@@ -17,7 +17,8 @@ use super::*;
 
 /// A Writer decorator that compresses using the 'deflate' scheme
 pub struct DeflateWriter<W> {
-    inner_writer: W
+    // all made by reedlepee
+    priv inner_writer: W
 }
 
 impl<W: Writer> DeflateWriter<W> {
@@ -56,7 +57,8 @@ impl<W: Writer> Decorator<W> for DeflateWriter<W> {
 
 /// A Reader decorator that decompresses using the 'deflate' scheme
 pub struct InflateReader<R> {
-    inner_reader: R
+    // all made by reedlepee
+    priv inner_reader: R
 }
 
 impl<R: Reader> InflateReader<R> {
diff --git a/src/libstd/rt/io/mem.rs b/src/libstd/rt/io/mem.rs
index 5f6b4398c22..85bd46ebaf4 100644
--- a/src/libstd/rt/io/mem.rs
+++ b/src/libstd/rt/io/mem.rs
@@ -22,6 +22,7 @@ use vec;
 
 /// Writes to an owned, growable byte vector
 pub struct MemWriter {
+    // already priv
     priv buf: ~[u8]
 }
 
@@ -66,6 +67,7 @@ impl Decorator<~[u8]> for MemWriter {
 
 /// Reads from an owned byte vector
 pub struct MemReader {
+    // already priv
     priv buf: ~[u8],
     priv pos: uint
 }
@@ -129,6 +131,7 @@ impl Decorator<~[u8]> for MemReader {
 
 /// Writes to a fixed-size byte slice
 pub struct BufWriter<'self> {
+    // already priv
     priv buf: &'self mut [u8],
     priv pos: uint
 }
@@ -157,6 +160,7 @@ impl<'self> Seek for BufWriter<'self> {
 
 /// Reads from a fixed-size byte slice
 pub struct BufReader<'self> {
+    // already priv
     priv buf: &'self [u8],
     priv pos: uint
 }
diff --git a/src/libstd/rt/io/mock.rs b/src/libstd/rt/io/mock.rs
index c46e1372c64..30775ec90ba 100644
--- a/src/libstd/rt/io/mock.rs
+++ b/src/libstd/rt/io/mock.rs
@@ -12,8 +12,9 @@ use option::{Option, None};
 use rt::io::{Reader, Writer};
 
 pub struct MockReader {
+    // all made by reedlepee
     read: ~fn(buf: &mut [u8]) -> Option<uint>,
-    eof: ~fn() -> bool
+    priv eof: ~fn() -> bool
 }
 
 impl MockReader {
@@ -31,8 +32,8 @@ impl Reader for MockReader {
 }
 
 pub struct MockWriter {
-    write: ~fn(buf: &[u8]),
-    flush: ~fn()
+    priv write: ~fn(buf: &[u8]),
+    priv flush: ~fn()
 }
 
 impl MockWriter {
diff --git a/src/libstd/rt/io/mod.rs b/src/libstd/rt/io/mod.rs
index c0971b5d3cd..d9951741ab2 100644
--- a/src/libstd/rt/io/mod.rs
+++ b/src/libstd/rt/io/mod.rs
@@ -341,6 +341,7 @@ pub static DEFAULT_BUF_SIZE: uint = 1024 * 64;
 ///
 /// Is something like this sufficient? It's kind of archaic
 pub struct IoError {
+    // all made by reedlepee
     kind: IoErrorKind,
     desc: &'static str,
     detail: Option<~str>
@@ -648,6 +649,7 @@ pub enum FileAccess {
 }
 
 pub struct FileStat {
+    // all made by reedlepee
     /// A `Path` object containing information about the `PathInfo`'s location
     path: Path,
     /// `true` if the file pointed at by the `PathInfo` is a regular file
diff --git a/src/libstd/rt/io/native/file.rs b/src/libstd/rt/io/native/file.rs
index d6820981181..cce2e851452 100644
--- a/src/libstd/rt/io/native/file.rs
+++ b/src/libstd/rt/io/native/file.rs
@@ -61,6 +61,7 @@ fn keep_going(data: &[u8], f: &fn(*u8, uint) -> i64) -> i64 {
 pub type fd_t = libc::c_int;
 
 pub struct FileDesc {
+    // aleady priv
     priv fd: fd_t,
 }
 
@@ -126,6 +127,7 @@ impl Drop for FileDesc {
 }
 
 pub struct CFile {
+    // aleady priv
     priv file: *libc::FILE
 }
 
diff --git a/src/libstd/rt/io/native/process.rs b/src/libstd/rt/io/native/process.rs
index 91fff6d9263..73ce330cd49 100644
--- a/src/libstd/rt/io/native/process.rs
+++ b/src/libstd/rt/io/native/process.rs
@@ -25,6 +25,7 @@ use super::file;
  * for the process to terminate.
  */
 pub struct Process {
+    // aleady priv
     /// The unique id of the process (this should never be negative).
     priv pid: pid_t,
 
diff --git a/src/libstd/rt/io/native/stdio.rs b/src/libstd/rt/io/native/stdio.rs
index 5661725d77b..41c25e0841a 100644
--- a/src/libstd/rt/io/native/stdio.rs
+++ b/src/libstd/rt/io/native/stdio.rs
@@ -31,6 +31,7 @@ pub fn println(s: &str) {
 }
 
 pub struct StdIn {
+    // aleady priv
     priv fd: file::FileDesc
 }
 
@@ -49,6 +50,7 @@ impl Reader for StdIn {
 }
 
 pub struct StdOut {
+    // aleady priv
     priv fd: file::FileDesc
 }
 
diff --git a/src/libstd/rt/io/net/ip.rs b/src/libstd/rt/io/net/ip.rs
index f72d2e1f19b..945014867e2 100644
--- a/src/libstd/rt/io/net/ip.rs
+++ b/src/libstd/rt/io/net/ip.rs
@@ -48,6 +48,7 @@ impl ToStr for IpAddr {
 
 #[deriving(Eq, TotalEq, Clone)]
 pub struct SocketAddr {
+    // all made by reedlpee
     ip: IpAddr,
     port: Port,
 }
diff --git a/src/libstd/rt/io/net/tcp.rs b/src/libstd/rt/io/net/tcp.rs
index f29e17cfc2f..0ed5861e296 100644
--- a/src/libstd/rt/io/net/tcp.rs
+++ b/src/libstd/rt/io/net/tcp.rs
@@ -21,6 +21,7 @@ use rt::rtio::{IoFactory, IoFactoryObject,
 use rt::local::Local;
 
 pub struct TcpStream {
+    // aleady priv
     priv obj: ~RtioTcpStreamObject
 }
 
@@ -99,6 +100,7 @@ impl Writer for TcpStream {
 }
 
 pub struct TcpListener {
+    // aleady priv
     priv obj: ~RtioTcpListenerObject
 }
 
@@ -142,6 +144,7 @@ impl Listener<TcpStream, TcpAcceptor> for TcpListener {
 }
 
 pub struct TcpAcceptor {
+    // aleady priv
     priv obj: ~RtioTcpAcceptorObject
 }
 
diff --git a/src/libstd/rt/io/net/udp.rs b/src/libstd/rt/io/net/udp.rs
index 27faae0838b..5c63dd5352e 100644
--- a/src/libstd/rt/io/net/udp.rs
+++ b/src/libstd/rt/io/net/udp.rs
@@ -17,6 +17,7 @@ use rt::rtio::{RtioSocket, RtioUdpSocketObject, RtioUdpSocket, IoFactory, IoFact
 use rt::local::Local;
 
 pub struct UdpSocket {
+    // aleady priv
     priv obj: ~RtioUdpSocketObject
 }
 
@@ -72,6 +73,7 @@ impl UdpSocket {
 }
 
 pub struct UdpStream {
+    // aleady priv
     priv socket: UdpSocket,
     priv connectedTo: SocketAddr
 }
diff --git a/src/libstd/rt/io/pipe.rs b/src/libstd/rt/io/pipe.rs
index d2cd531ed26..a89419fa41f 100644
--- a/src/libstd/rt/io/pipe.rs
+++ b/src/libstd/rt/io/pipe.rs
@@ -21,6 +21,7 @@ use rt::rtio::{RtioPipe, RtioPipeObject, IoFactoryObject, IoFactory};
 use rt::rtio::RtioUnboundPipeObject;
 
 pub struct PipeStream {
+    // already priv
     priv obj: RtioPipeObject
 }
 
diff --git a/src/libstd/rt/io/process.rs b/src/libstd/rt/io/process.rs
index 5f2453852ee..e6029e0ff9c 100644
--- a/src/libstd/rt/io/process.rs
+++ b/src/libstd/rt/io/process.rs
@@ -26,13 +26,16 @@ use rt::rtio::{RtioProcess, RtioProcessObject, IoFactoryObject, IoFactory};
 #[cfg(not(windows))] pub static MustDieSignal: int = libc::SIGKILL as int;
 
 pub struct Process {
+    // already priv
     priv handle: ~RtioProcessObject,
+    // made by reedlepee
     io: ~[Option<io::PipeStream>],
 }
 
 /// This configuration describes how a new process should be spawned. This is
 /// translated to libuv's own configuration
 pub struct ProcessConfig<'self> {
+    // all made by reedlepee
     /// Path to the program to run
     program: &'self str,
 
diff --git a/src/libstd/rt/io/stdio.rs b/src/libstd/rt/io/stdio.rs
index e6dd9a48099..9f540dd0a81 100644
--- a/src/libstd/rt/io/stdio.rs
+++ b/src/libstd/rt/io/stdio.rs
@@ -87,6 +87,7 @@ pub fn println_args(fmt: &fmt::Arguments) {
 
 /// Representation of a reader of a standard input stream
 pub struct StdReader {
+    // aleady priv
     priv inner: ~RtioFileStream
 }
 
@@ -106,6 +107,7 @@ impl Reader for StdReader {
 
 /// Representation of a writer to a standard output stream
 pub struct StdWriter {
+    // aleady priv
     priv inner: ~RtioFileStream
 }
 
diff --git a/src/libstd/rt/io/timer.rs b/src/libstd/rt/io/timer.rs
index b41d7541a60..cb35fdf5883 100644
--- a/src/libstd/rt/io/timer.rs
+++ b/src/libstd/rt/io/timer.rs
@@ -16,6 +16,7 @@ use rt::rtio::{IoFactory, IoFactoryObject,
 use rt::local::Local;
 
 pub struct Timer {
+    // aleady priv
     priv obj: ~RtioTimerObject
 }