diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-12-30 17:01:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-30 17:01:39 +0100 |
| commit | bd20fc1fd657b32f7aa1d70d8723f04c87f21606 (patch) | |
| tree | 3d70d1c6196154ac2cc2c5b72f2c9c3ea90df647 /library/std/src/net | |
| parent | 25b1f1c26d823d2d19003a7fc1c62b4ba15f354d (diff) | |
| parent | 131ba572c228efd07d3d2a98488c75f5453db82d (diff) | |
| download | rust-bd20fc1fd657b32f7aa1d70d8723f04c87f21606.tar.gz rust-bd20fc1fd657b32f7aa1d70d8723f04c87f21606.zip | |
Rollup merge of #104182 - gabhijit:ipv6-in6addr-any-doc-fix, r=m-ou-se
`IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` documentation. Added documentation for IPv6 Addresses `IN6ADDR_ANY_INIT` also known as `in6addr_any` and `IN6ADDR_LOOPBACK_INIT` also known as `in6addr_loopback` similar to `INADDR_ANY` for IPv4 Addresses.
Diffstat (limited to 'library/std/src/net')
| -rw-r--r-- | library/std/src/net/ip_addr.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/std/src/net/ip_addr.rs b/library/std/src/net/ip_addr.rs index 5453853e138..07f08c1b586 100644 --- a/library/std/src/net/ip_addr.rs +++ b/library/std/src/net/ip_addr.rs @@ -1195,6 +1195,9 @@ impl Ipv6Addr { /// An IPv6 address representing localhost: `::1`. /// + /// This corresponds to constant `IN6ADDR_LOOPBACK_INIT` or `in6addr_loopback` in other + /// languages. + /// /// # Examples /// /// ``` @@ -1203,11 +1206,15 @@ impl Ipv6Addr { /// let addr = Ipv6Addr::LOCALHOST; /// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)); /// ``` + #[doc(alias = "IN6ADDR_LOOPBACK_INIT")] + #[doc(alias = "in6addr_loopback")] #[stable(feature = "ip_constructors", since = "1.30.0")] pub const LOCALHOST: Self = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1); /// An IPv6 address representing the unspecified address: `::` /// + /// This corresponds to constant `IN6ADDR_ANY_INIT` or `in6addr_any` in other languages. + /// /// # Examples /// /// ``` @@ -1216,6 +1223,8 @@ impl Ipv6Addr { /// let addr = Ipv6Addr::UNSPECIFIED; /// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)); /// ``` + #[doc(alias = "IN6ADDR_ANY_INIT")] + #[doc(alias = "in6addr_any")] #[stable(feature = "ip_constructors", since = "1.30.0")] pub const UNSPECIFIED: Self = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0); |
