mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
Add references to explanation about portability to f{32,64}::{from,to}_{be,le,ne}_bytes
This commit is contained in:
@@ -902,6 +902,9 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
/// Return the memory representation of this floating point number as a byte array in
|
||||
/// big-endian (network) byte order.
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -920,6 +923,9 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
/// Return the memory representation of this floating point number as a byte array in
|
||||
/// little-endian byte order.
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -944,6 +950,9 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
/// [`to_be_bytes`]: f32::to_be_bytes
|
||||
/// [`to_le_bytes`]: f32::to_le_bytes
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -968,6 +977,9 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
|
||||
/// Create a floating point value from its representation as a byte array in big endian.
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -984,6 +996,9 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
|
||||
/// Create a floating point value from its representation as a byte array in little endian.
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -1007,6 +1022,9 @@ pub const fn from_bits(v: u32) -> Self {
|
||||
/// [`from_be_bytes`]: f32::from_be_bytes
|
||||
/// [`from_le_bytes`]: f32::from_le_bytes
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
||||
@@ -918,6 +918,9 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
/// Return the memory representation of this floating point number as a byte array in
|
||||
/// big-endian (network) byte order.
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -936,6 +939,9 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
/// Return the memory representation of this floating point number as a byte array in
|
||||
/// little-endian byte order.
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -960,6 +966,9 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
/// [`to_be_bytes`]: f64::to_be_bytes
|
||||
/// [`to_le_bytes`]: f64::to_le_bytes
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -984,6 +993,9 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
|
||||
/// Create a floating point value from its representation as a byte array in big endian.
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -1000,6 +1012,9 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
|
||||
/// Create a floating point value from its representation as a byte array in little endian.
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -1023,6 +1038,9 @@ pub const fn from_bits(v: u64) -> Self {
|
||||
/// [`from_be_bytes`]: f64::from_be_bytes
|
||||
/// [`from_le_bytes`]: f64::from_le_bytes
|
||||
///
|
||||
/// See [`from_bits`](Self::from_bits) for some discussion of the
|
||||
/// portability of this operation (there are almost no issues).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user