summaryrefslogtreecommitdiff
path: root/library/std/src/sys/unix/stdio.rs
Commit message (Collapse)AuthorAgeFilesLines
* Implement read_buf for a few more typesTomasz Miąsko2023-03-061-1/+5
| | | | | | | | | | | | | Implement read_buf for TcpStream, Stdin, StdinLock, ChildStdout, ChildStderr (and internally for AnonPipe, Handle, Socket), so that it skips buffer initialization. The other provided methods like read_to_string and read_to_end are implemented in terms of read_buf and so benefit from the optimization as well. This commit also implements read_vectored and is_read_vectored where applicable.
* Consolidate AsFd instances for stdio types into `library/std/src/os/fd/owned.rs`Josh Triplett2022-10-101-49/+1
|
* Implement stabilization of `#[feature(io_safety)]`.Dan Gohman2022-06-141-6/+6
| | | | | | | | Implement stabilization of [I/O safety], aka `#[feature(io_safety)]`. Fixes #87074. [I/O safety]: https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md
* Rename `BorrowedFd::borrow_raw_fd` to `BorrowedFd::borrow_raw`.Dan Gohman2022-02-041-6/+6
| | | | | | | | | | | | Also, rename `BorrowedHandle::borrow_raw_handle` and `BorrowedSocket::borrow_raw_socket` to `BorrowedHandle::borrow_raw` and `BorrowedSocket::borrow_raw`. This is just a minor rename to reduce redundancy in the user code calling these functions, and to eliminate an inessential difference between `BorrowedFd` code and `BorrowedHandle`/`BorrowedSocket` code. While here, add a simple test exercising `BorrowedFd::borrow_raw_fd`.
* I/O safety.Dan Gohman2021-08-191-6/+59
| | | | | | | | | | | | | Introduce `OwnedFd` and `BorrowedFd`, and the `AsFd` trait, and implementations of `AsFd`, `From<OwnedFd>` and `From<T> for OwnedFd` for relevant types, along with Windows counterparts for handles and sockets. Tracking issue: - <https://github.com/rust-lang/rust/issues/87074> RFC: - <https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md>
* Make raw standard stream constructors constTomasz Miąsko2020-08-211-3/+3
|
* Remove result type from raw standard streams constructorsTomasz Miąsko2020-08-211-7/+7
| | | | | Raw standard streams constructors are infallible. Remove unnecessary result type.
* mv std libs to library/mark2020-07-271-0/+88