-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document when types have OS-dependent sizes #48932
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,9 @@ use slice; | |
/// as possibly some version-dependent additional information. See [`SocketAddrV4`]'s and | ||
/// [`SocketAddrV6`]'s respective documentation for more details. | ||
/// | ||
/// The size of a SocketAddr instance may vary depending on the target operating | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Let's wrap |
||
/// system. | ||
/// | ||
/// [IP address]: ../../std/net/enum.IpAddr.html | ||
/// [`SocketAddrV4`]: ../../std/net/struct.SocketAddrV4.html | ||
/// [`SocketAddrV6`]: ../../std/net/struct.SocketAddrV6.html | ||
|
@@ -61,6 +64,9 @@ pub enum SocketAddr { | |
/// | ||
/// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. | ||
/// | ||
/// The size of a SocketAddrV4 struct may vary depending on the target operating | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's put some backticks on |
||
/// system. | ||
/// | ||
/// [IETF RFC 793]: https://tools.ietf.org/html/rfc793 | ||
/// [IPv4 address]: ../../std/net/struct.Ipv4Addr.html | ||
/// [`SocketAddr`]: ../../std/net/enum.SocketAddr.html | ||
|
@@ -88,6 +94,9 @@ pub struct SocketAddrV4 { inner: c::sockaddr_in } | |
/// | ||
/// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. | ||
/// | ||
/// The size of a SocketAddrV6 struct may vary depending on the target operating | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's put some backticks on |
||
/// system. | ||
/// | ||
/// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3 | ||
/// [IPv6 address]: ../../std/net/struct.Ipv6Addr.html | ||
/// [`SocketAddr`]: ../../std/net/enum.SocketAddr.html | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,9 @@ use sys_common::{AsInner, FromInner}; | |
/// This enum can contain either an [`Ipv4Addr`] or an [`Ipv6Addr`], see their | ||
/// respective documentation for more details. | ||
/// | ||
/// The size of an IpAddr instance may vary depending on the target operating | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's put some backticks on |
||
/// system. | ||
/// | ||
/// [`Ipv4Addr`]: ../../std/net/struct.Ipv4Addr.html | ||
/// [`Ipv6Addr`]: ../../std/net/struct.Ipv6Addr.html | ||
/// | ||
|
@@ -61,6 +64,9 @@ pub enum IpAddr { | |
/// | ||
/// See [`IpAddr`] for a type encompassing both IPv4 and IPv6 addresses. | ||
/// | ||
/// The size of an Ipv4Addr struct may vary depending on the target operating | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's put some backticks on |
||
/// system. | ||
/// | ||
/// [IETF RFC 791]: https://tools.ietf.org/html/rfc791 | ||
/// [`IpAddr`]: ../../std/net/enum.IpAddr.html | ||
/// | ||
|
@@ -93,6 +99,9 @@ pub struct Ipv4Addr { | |
/// | ||
/// See [`IpAddr`] for a type encompassing both IPv4 and IPv6 addresses. | ||
/// | ||
/// The size of an Ipv6Addr struct may vary depending on the target operating | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's put some backticks on |
||
/// system. | ||
/// | ||
/// [IETF RFC 4291]: https://tools.ietf.org/html/rfc4291 | ||
/// [`IpAddr`]: ../../std/net/enum.IpAddr.html | ||
/// | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,9 @@ pub use core::time::Duration; | |
/// allows measuring the duration between two instants (or comparing two | ||
/// instants). | ||
/// | ||
/// The size of an Instant struct may vary depending on the target operating | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's put some backticks on |
||
/// system. | ||
/// | ||
/// Example: | ||
/// | ||
/// ```no_run | ||
|
@@ -88,6 +91,9 @@ pub struct Instant(time::Instant); | |
/// fixed point in time, a `SystemTime` can be converted to a human-readable time, | ||
/// or perhaps some other string representation. | ||
/// | ||
/// The size of a SystemTime struct may vary depending on the target operating | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's put some backticks on |
||
/// system. | ||
/// | ||
/// [`Instant`]: ../../std/time/struct.Instant.html | ||
/// [`Result`]: ../../std/result/enum.Result.html | ||
/// [`Duration`]: ../../std/time/struct.Duration.html | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these types aren't publicly exported do you think we need to mention their size variance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, if it's not public then yeah, that can be omitted.