about summary refs log tree commit diff
path: root/src/libstd/io/mod.rs
AgeCommit message (Collapse)AuthorLines
2013-12-23Fixing more doc testsAlex Crichton-1/+7
2013-12-23std: Fix all code examplesAlex Crichton-1/+17
2013-12-20auto merge of #10986 : adridu59/rust/patch-new, r=alexcrichtonbors-3/+3
Thanks to @huonw for some mentoring. :cake:
2013-12-20doc: forward-port the conditions tutorial + fixup libstd exampleAdrien Tétar-3/+3
2013-12-19Get comm_adapters building againAlex Crichton-0/+3
I accidentally removed this module from compilation awhile back, this adds it back in. Closes #11076
2013-12-16Fallout of rewriting std::commAlex Crichton-3/+0
2013-12-15auto merge of #10984 : huonw/rust/clean-raw, r=cmrbors-2/+2
See commits for details.
2013-12-15Move std::{str,vec}::raw::set_len to an unsafe method on Owned{Vector,Str}.Huon Wilson-2/+2
2013-12-15std: fix spelling in docs.Huon Wilson-3/+3
2013-12-13auto merge of #10895 : sfackler/rust/io-util, r=alexcrichtonbors-0/+3
This adds a bunch of useful Reader and Writer implementations. I'm not a huge fan of the name `util` but I can't think of a better name and I don't want to make `std::io` any longer than it already is.
2013-12-11Add std::io::utilSteven Fackler-0/+3
This adds a bunch of useful Reader and Writer implementations. I'm not a huge fan of the name `util` but I can't think of a better name and I don't want to make `std::io` any longer than it already is.
2013-12-11Make 'self lifetime illegal.Erik Price-5/+5
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-11std::io: Add Buffer.lines(), change .bytes() apiklutzy-37/+105
- `Buffer.lines()` returns `LineIterator` which yields line using `.read_line()`. - `Reader.bytes()` now takes `&mut self` instead of `self`. - `Reader.read_until()` swallows `EndOfFile`. This also affects `.read_line()`.
2013-12-10librustpkg: Make `io::ignore_io_error()` use RAII; remove a few morePatrick Walton-2/+3
cells.
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-1/+1
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-12-04std::str: s/from_utf8_slice/from_utf8/, to make the basic case shorter.Huon Wilson-1/+1
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-1/+1
2013-11-28Register new snapshotsAlex Crichton-1/+1
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-13/+9
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-1/+1
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-2/+2
2013-11-17auto merge of #10466 : alexcrichton/rust/issue-10334, r=cmrbors-1/+101
These commits create a `Buffer` trait in the `io` module which represents an I/O reader which is internally buffered. This abstraction is used to reasonably implement `read_line` and `read_until` along with at least an ok implementation of `read_char` (although I certainly haven't benchmarked `read_char`).
2013-11-16Implement read_char on the Buffer traitAlex Crichton-0/+27
2013-11-13Implement native::IoFactoryAlex Crichton-18/+1
This commit re-organizes the io::native module slightly in order to have a working implementation of rtio::IoFactory which uses native implementations. The goal is to seamlessly multiplex among libuv/native implementations wherever necessary. Right now most of the native I/O is unimplemented, but we have existing bindings for file descriptors and processes which have been hooked up. What this means is that you can now invoke println!() from libstd with no local task, no local scheduler, and even without libuv. There's still plenty of work to do on the native I/O factory, but this is the first steps into making it an official portion of the standard library. I don't expect anyone to reach into io::native directly, but rather only std::io primitives will be used. Each std::io interface seamlessly falls back onto the native I/O implementation if the local scheduler doesn't have a libuv one (hurray trait ojects!)
2013-11-13Introduce an io::Buffer traitAlex Crichton-1/+74
This trait is meant to abstract whether a reader is actually implemented with an underlying buffer. For all readers which are implemented as such, we can efficiently implement things like read_char, read_line, read_until, etc. There are two required methods for managing the internal buffer, and otherwise read_line and friends can all become default methods. Closes #10334
2013-11-11Move std::rt::io to std::ioAlex Crichton-0/+1226