-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(os_fd)]
This is a tracking issue for the std::os::fd module, which is currently defined on
both Unix and WASI , and contains OwnedFd, BorrowedFd, RawFd, AsFd,
AsRawFd, IntoRawFd, and FromRawFd.
Public API
The types and traits are the same as those already defined in std::os::unix::io
and std::os::wasi::io. This PR is just introducing a new alias for them to help
users write portable code.
// in std::os
#[cfg(any(unix, target_os = "wasi"))]
pub mod fd {
pub type RawFd = ...;
pub struct OwnedFd { ... }
pub struct BorrowedFd<'a> { ... }
pub trait AsFd { ... }
pub trait AsRawFd { ... }
pub trait IntoRawFd { ... }
pub trait FromRawFd { ... }
}Steps / History
- Implementation: Make
std::os::fdpublic. #98368 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- "fd" isn't literally an "os", yet this proposes having it as a public module under
std::os. One can think of it as meaning "OS's that use fds". Is that weird?
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.