summaryrefslogtreecommitdiffstats
path: root/library/std/src/os/unix/net/datagram.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /library/std/src/os/unix/net/datagram.rs
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/std/src/os/unix/net/datagram.rs')
-rw-r--r--library/std/src/os/unix/net/datagram.rs45
1 files changed, 35 insertions, 10 deletions
diff --git a/library/std/src/os/unix/net/datagram.rs b/library/std/src/os/unix/net/datagram.rs
index 272b4f5dc..34db54235 100644
--- a/library/std/src/os/unix/net/datagram.rs
+++ b/library/std/src/os/unix/net/datagram.rs
@@ -102,7 +102,6 @@ impl UnixDatagram {
/// # Examples
///
/// ```no_run
- /// #![feature(unix_socket_abstract)]
/// use std::os::unix::net::{UnixDatagram};
///
/// fn main() -> std::io::Result<()> {
@@ -119,7 +118,7 @@ impl UnixDatagram {
/// Ok(())
/// }
/// ```
- #[unstable(feature = "unix_socket_abstract", issue = "85410")]
+ #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
pub fn bind_addr(socket_addr: &SocketAddr) -> io::Result<UnixDatagram> {
unsafe {
let socket = UnixDatagram::unbound()?;
@@ -217,7 +216,6 @@ impl UnixDatagram {
/// # Examples
///
/// ```no_run
- /// #![feature(unix_socket_abstract)]
/// use std::os::unix::net::{UnixDatagram};
///
/// fn main() -> std::io::Result<()> {
@@ -235,7 +233,7 @@ impl UnixDatagram {
/// Ok(())
/// }
/// ```
- #[unstable(feature = "unix_socket_abstract", issue = "85410")]
+ #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
pub fn connect_addr(&self, socket_addr: &SocketAddr) -> io::Result<()> {
unsafe {
cvt(libc::connect(
@@ -523,7 +521,6 @@ impl UnixDatagram {
/// # Examples
///
/// ```no_run
- /// #![feature(unix_socket_abstract)]
/// use std::os::unix::net::{UnixDatagram};
///
/// fn main() -> std::io::Result<()> {
@@ -535,7 +532,7 @@ impl UnixDatagram {
/// Ok(())
/// }
/// ```
- #[unstable(feature = "unix_socket_abstract", issue = "85410")]
+ #[stable(feature = "unix_socket_abstract", since = "1.70.0")]
pub fn send_to_addr(&self, buf: &[u8], socket_addr: &SocketAddr) -> io::Result<usize> {
unsafe {
let count = cvt(libc::sendto(
@@ -811,8 +808,24 @@ impl UnixDatagram {
///
/// # Examples
///
- #[cfg_attr(any(target_os = "android", target_os = "linux"), doc = "```no_run")]
- #[cfg_attr(not(any(target_os = "android", target_os = "linux")), doc = "```ignore")]
+ #[cfg_attr(
+ any(
+ target_os = "android",
+ target_os = "linux",
+ target_os = "netbsd",
+ target_os = "freebsd",
+ ),
+ doc = "```no_run"
+ )]
+ #[cfg_attr(
+ not(any(
+ target_os = "android",
+ target_os = "linux",
+ target_os = "netbsd",
+ target_os = "freebsd"
+ )),
+ doc = "```ignore"
+ )]
/// #![feature(unix_socket_ancillary_data)]
/// use std::os::unix::net::UnixDatagram;
///
@@ -822,7 +835,13 @@ impl UnixDatagram {
/// Ok(())
/// }
/// ```
- #[cfg(any(doc, target_os = "android", target_os = "linux", target_os = "netbsd",))]
+ #[cfg(any(
+ doc,
+ target_os = "android",
+ target_os = "linux",
+ target_os = "netbsd",
+ target_os = "freebsd"
+ ))]
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
self.0.set_passcred(passcred)
@@ -834,7 +853,13 @@ impl UnixDatagram {
/// Get the socket option `SO_PASSCRED`.
///
/// [`set_passcred`]: UnixDatagram::set_passcred
- #[cfg(any(doc, target_os = "android", target_os = "linux", target_os = "netbsd",))]
+ #[cfg(any(
+ doc,
+ target_os = "android",
+ target_os = "linux",
+ target_os = "netbsd",
+ target_os = "freebsd"
+ ))]
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
pub fn passcred(&self) -> io::Result<bool> {
self.0.passcred()