rust/library/std/src/os
bors 6639672554 Auto merge of #117156 - jmillikin:os-unix-socket-ext, r=Amanieu,dtolnay
Convert `Unix{Datagram,Stream}::{set_}passcred()` to per-OS traits

These methods are the pre-stabilized API for obtaining peer credentials from an `AF_UNIX` socket, part of the `unix_socket_ancillary_data` feature.

Their current behavior is to get/set one of the `SO_PASSCRED` (Linux), `LOCAL_CREDS_PERSISTENT` (FreeBSD), or `LOCAL_CREDS` (NetBSD) socket options. On other targets the `{set_}passcred()` methods do not exist.

There are two problems with this approach:

1. Having public methods only exist for certain targets isn't permitted in a stable `std` API.

2. These options have generally similar purposes, but they are non-POSIX and their details can differ in subtle and surprising ways (such as whether they continue to be set after the next call to `recvmsg()`).

Splitting into OS-specific extension traits is the preferred solution to both problems.
2024-03-11 07:46:01 +00:00
..
aix Support AIX in Rust standard library 2023-10-09 14:02:57 +08:00
android Convert Unix{Datagram,Stream}::{set_}passcred() to per-OS traits 2023-10-25 17:01:21 +09:00
dragonfly Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
emscripten Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
espidf Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
fd Rollup merge of #114655 - nbdd0121:io-safety, r=dtolnay 2024-03-09 21:40:06 +01:00
fortanix_sgx sync the various FromRawFd trait docs, and remove 'valid' 2023-08-14 08:49:40 +02:00
freebsd Convert Unix{Datagram,Stream}::{set_}passcred() to per-OS traits 2023-10-25 17:01:21 +09:00
fuchsia Add definitions for riscv64gc-unknown-fuchsia 2023-04-25 16:42:59 -07:00
haiku Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
hermit remove code duplications 2023-02-24 15:30:14 +01:00
horizon Update libc::stat field names 2022-06-13 20:44:58 -07:00
hurd added support for GNU/Hurd 2023-09-21 17:31:25 +02:00
illumos Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
ios Substitute version placeholders 2023-11-15 19:40:51 -05:00
l4re Remove asmjs from library 2023-10-28 23:10:45 -07:00
linux Finishing clone3 clean up 2024-01-24 17:23:51 +03:00
macos Substitute version placeholders 2023-11-15 19:40:51 -05:00
net os::net: expanding TcpStreamExt for Linux with tcp_deferaccept. 2024-02-21 20:59:15 +00:00
netbsd Convert Unix{Datagram,Stream}::{set_}passcred() to per-OS traits 2023-10-25 17:01:21 +09:00
nto Update library/std/src/os/nto/mod.rs 2023-03-01 06:42:40 +01:00
openbsd Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
raw Remove #[cfg(all())] workarounds from c_char 2023-06-16 12:17:12 +00:00
redox Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
solaris Remove use of #[rustc_deprecated] 2022-04-14 01:33:13 -04:00
solid kmc-solid: Re-export {As,Borrowed,Owned}Fd in std::os::solid::prelude 2023-11-08 10:52:00 +09:00
uefi Rebase to master 2023-09-22 17:23:33 +05:30
unix Auto merge of #117156 - jmillikin:os-unix-socket-ext, r=Amanieu,dtolnay 2024-03-11 07:46:01 +00:00
vita PS Vita std support 2023-05-07 18:57:43 +03:00
vxworks Take sys/vxworks/{fd,fs,io} from sys/unix instead. 2020-10-16 06:19:00 +02:00
wasi Rename wasm32-wasi-preview2 to wasm32-wasip2 2024-02-27 10:14:45 -05:00
wasip2 Rename wasm32-wasi-preview2 to wasm32-wasip2 2024-02-27 10:14:45 -05:00
watchos Substitute version placeholders 2023-11-15 19:40:51 -05:00
windows Rollup merge of #121711 - ChrisDenton:junction, r=Mark-Simulacrum 2024-03-09 21:40:09 +01:00
xous std: xous: use constants for stdout and stderr 2024-01-13 09:38:42 -08:00
mod.rs Rename wasm32-wasi-preview2 to wasm32-wasip2 2024-02-27 10:14:45 -05:00