about summary refs log tree commit diff
path: root/library/std/src/os/fd/mod.rs
AgeCommit message (Collapse)AuthorLines
2025-03-10Apply rustc-0054-Add-std-os-fd-support-for-Trusty.patchNicole LeGare-0/+1
2023-01-14Fix the stability attributes for `std::os::fd`.Dan Gohman-3/+3
As @bjorn3 pointed out [here], I used the wrong stability attribute in #98368 when making `std::os::fd` public. I set it to Rust 1.63, which was when io-safety was stabilized, but it should be Rust 1.66, which was when `std::os::fd` was stabilized. [here]: https://github.com/rust-lang/rust/pull/98368#discussion_r1063721420
2022-08-29Re-introduce `unstable` attributes.Dan Gohman-2/+2
Add `#[unstable(feature = "os_fd", issue = "98699")]` to the new `pub use` declarations.
2022-08-29Clarify that the `fd` module is supported on Unix and WASI.Dan Gohman-3/+2
2022-08-29Make `std::os::fd` public.Dan Gohman-2/+12
`std::os::fd` defines types like `OwnedFd` and `RawFd` and is common between Unix and non-Unix platforms that share a basic file-descriptor concept. Rust currently uses this internally to simplify its own code, but it would be useful for external users in the same way, so make it public. This means that `OwnedFd` etc. will all appear in three places, for example on unix platforms: - `std::os::fd::OwnedFd` - `std::os::unix::io::OwnedFd` - `std::os::unix::prelude::OwnedFd`
2022-06-14Implement stabilization of `#[feature(io_safety)]`.Dan Gohman-1/+1
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
2022-02-04Rename `BorrowedFd::borrow_raw_fd` to `BorrowedFd::borrow_raw`.Dan Gohman-0/+3
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`.
2021-08-19Factor out a common `RawFd`/`AsRawFd`/etc for Unix and WASI.Dan Gohman-0/+13