aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorJack O'Connor <oconnor663@gmail.com>2019-05-17 16:40:54 -0400
committerAndrew Gallant <jamslam@gmail.com>2019-06-09 09:40:43 -0400
commitfd3fb623b3fbff689892a1641c99b4168076146b (patch)
tree425a15c700bc44722650b64fd9cb3be4aeb4f13b /src/lib.rs
parent81889427848a53b922c2bffb7ae0683273aa3d6f (diff)
downloadbyteorder-fd3fb623b3fbff689892a1641c99b4168076146b.tar.gz
doc: list alternatives, as Rust 1.32
Closes #148
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 2ce9603..db4d24d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,6 @@
/*!
-This crate provides convenience methods for encoding and decoding numbers
-in either [big-endian or little-endian order].
+This crate provides convenience methods for encoding and decoding numbers in
+either [big-endian or little-endian order].
The organization of the crate is pretty simple. A trait, [`ByteOrder`], specifies
byte conversion methods for each type of number in Rust (sans numbers that have
@@ -49,6 +49,12 @@ when built with the `i128` feature enabled.
This crate can also be used without the standard library.
+# Alternatives
+
+Note that as of Rust 1.32, the standard numeric types provide built-in methods
+like `to_le_bytes` and `from_le_bytes`, which support some of the same use
+cases.
+
[big-endian or little-endian order]: https://en.wikipedia.org/wiki/Endianness
[`ByteOrder`]: trait.ByteOrder.html
[`BigEndian`]: enum.BigEndian.html