summary refs log tree commit diff
path: root/src/libstd/io/mod.rs
AgeCommit message (Collapse)AuthorLines
2014-01-08Robustly read remaining bytes in a characterAlex Crichton-3/+9
Closes #11372
2014-01-06Remove some unnecessary type castsFlorian Hahn-5/+5
Conflicts: src/librustc/middle/lint.rs
2014-01-04auto merge of #11310 : Dretch/rust/write_char, r=alexcrichtonbors-0/+8
2014-01-04auto merge of #11271 : adridu59/rust/patch-io, r=huonwbors-21/+45
2014-01-04Restore Writer.write_char, see #10861.Gareth Smith-0/+8
2014-01-04std: io: add some code examplesAdrien Tétar-21/+45
Closes #11232.
2014-01-03Add read_to_str and write_{str, line}Alex Crichton-24/+53
These methods are sorely needed on readers and writers, and I believe that the encoding story should be solved with composition. This commit adds back the missed functions when reading/writing strings onto generic Readers/Writers.
2014-01-01Don't leave lingering files in doc testsAlex Crichton-0/+2
Closes #11234
2013-12-24rustuv: Get all tests passing again after refactorAlex Crichton-3/+2
All tests except for the homing tests are now working again with the librustuv/libgreen refactoring. The homing-related tests are currently commented out and now placed in the rustuv::homing module. I plan on refactoring scheduler pool spawning in order to enable more homing tests in a future commit.
2013-12-24std: Get stdtest all passing againAlex Crichton-0/+4
This commit brings the library up-to-date in order to get all tests passing again
2013-12-24native: Introduce libnativeAlex Crichton-5/+0
This commit introduces a new crate called "native" which will be the crate that implements the 1:1 runtime of rust. This currently entails having an implementation of std::rt::Runtime inside of libnative as well as moving all of the native I/O implementations to libnative. The current snag is that the start lang item must currently be defined in libnative in order to start running, but this will change in the future. Cool fact about this crate, there are no extra features that are enabled. Note that this commit does not include any makefile support necessary for building libnative, that's all coming in a later commit.
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