summary refs log tree commit diff
path: root/src/libstd/rt/io/mod.rs
AgeCommit message (Collapse)AuthorLines
2013-09-24Stop accepting 'impl ...;', require {} insteadAlex Crichton-1/+1
Progress on #7981
2013-09-18Implement process bindings to libuvAlex Crichton-0/+9
This is a re-landing of #8645, except that the bindings are *not* being used to power std::run just yet. Instead, this adds the bindings as standalone bindings inside the rt::io::process module. I made one major change from before, having to do with how pipes are created/bound. It's much clearer now when you can read/write to a pipe, as there's an explicit difference (different types) between an unbound and a bound pipe. The process configuration now takes unbound pipes (and consumes ownership of them), and will return corresponding pipe structures back if spawning is successful (otherwise everything is destroyed normally).
2013-09-18Register new snapshotsAlex Crichton-6/+2
2013-09-16std: generlize & move io::file::suppressed_stat to io::ignore_io_errorJeff Olson-0/+12
2013-09-16std: expose more stat infoJeff Olson-6/+2
2013-09-16std: clean up Dir/FileInfo inheritence and flesh out Dir InfoJeff Olson-2/+8
2013-09-16std/rt: in-progress file io workJeff Olson-0/+24
std: remove unneeded field from RequestData struct std: rt::uv::file - map us_fs_stat & start refactoring calls into FsRequest std: stubbing out stat calls from the top-down into uvio std: us_fs_* operations are now by-val self methods on FsRequest std: post-rebase cleanup std: add uv_fs_mkdir|rmdir + tests & minor test cleanup in rt::uv::file WORKING: fleshing out FileStat and FileInfo + tests std: reverting test files.. refactoring back and cleanup...
2013-09-10Buffered I/O wrappersSteven Fackler-0/+3
The default buffer size is the same as the one in Java's BufferedWriter. We may want BufferedWriter to have a Drop impl that flushes, but that isn't possible right now due to #4252/#4430. This would be a bit awkward due to the possibility of the inner flush failing. For what it's worth, Java's BufferedReader doesn't have a flushing finalizer, but that may just be because Java's finalizer support is awful. Closes #8953
2013-09-06Fix Acceptor iterator ending early if a connection attempt failsEric Reed-4/+9
2013-09-05std::rt: Add get_host_addresses functionBrian Anderson-7/+1
This is a very simplistic method for host name resolution. It converts a host name to a vector of IP addresses. Should be enough to get started.
2013-09-05Implement Stream automatically for Reader + WriterChris Morgan-0/+2
This is consistent with the existing documentation but was not the actual behaviour, which I've found to be rather a nuisance, actually.
2013-09-04Added explicit pub to several conditions. Enables completion of #6009.Felix S. Klock II-5/+3
2013-09-03auto merge of #8963 : jmgrosen/rust/issue-8881, r=alexcrichtonbors-0/+4
2013-09-03Fixes #8881. condition! imports parent's pub identifiersjmgrosen-0/+4
2013-08-29Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, ↵Brian Anderson-3/+0
r=brson" This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562. Conflicts: mk/rt.mk src/libuv
2013-08-27Implement process bindings to libuvAlex Crichton-0/+3
Closes #6436
2013-08-22std: put FileMode/Access->whence-mask in uvio, open/unlink as fns in file::Jeff Olson-0/+24
2013-08-22std: rework file io.. support [p]read,[p]write, impl seek/tell + more testsJeff Olson-0/+1
2013-08-21auto merge of #8600 : sfackler/rust/http, r=brsonbors-1/+0
It's an empty stub and as one of the comments notes, doesn't belong in libstd.
2013-08-18Delete std::rt::io::net::httpSteven Fackler-1/+0
It's an empty stub and as one of the comments notes, doesn't belong in libstd.
2013-08-18More spelling corrections.Huon Wilson-1/+1
2013-08-16doc: convert remaining uses of core:: to std::.Huon Wilson-1/+1
2013-08-16doc: correct spelling in documentation.Huon Wilson-3/+3
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-1/+35
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-07-22std: minor timer cleanup based on feedbackJeff Olson-1/+1
2013-07-22std: add rt::io::TimerJeff Olson-0/+4
2013-06-23Split out starting a listener from accepting incoming connections.Eric Reed-6/+32
The Listener trait takes two type parameters, the type of connection and the type of Acceptor, and specifies only one method, listen, which consumes the listener and produces an Acceptor. The Acceptor trait takes one type parameter, the type of connection, and defines two methods. The accept() method waits for an incoming connection attempt and returns the result. The incoming() method creates an iterator over incoming connections and is a default method. Example: let listener = TcpListener.bind(addr); // Bind to a socket let acceptor = listener.listen(); // Start the listener for stream in acceptor.incoming() { // Process incoming connections forever (or until you break out of the loop) }
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-0/+504
This only changes the directory names; it does not change the "real" metadata names.