diff --git a/README.md b/README.md index c36a737..120fc7e 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,14 @@ This crate provides the [`Be`] (big-endian) and [`Le`] (little-endian) byte-order-aware numeric types. +Unlike the popular [`byteorder`] crate, which focuses on the action of encoding and decoding numbers to and from byte streams, this crate focuses on the state of numbers. +This is useful to create structs that contain fields of a specific endianness for interoperability, such as in virtio. +In comparison to other crates that focus on state, this crate closely follows naming conventions from [`core::num`], has rich functionality, and extensive documentation of each method. + [`Be`]: https://docs.rs/endian-num/latest/endian_num/struct.Be.html [`Le`]: https://docs.rs/endian-num/latest/endian_num/struct.Le.html +[`byteorder`]: https://docs.rs/byteorder +[`core::num`]: https://doc.rust-lang.org/stable/core/num/index.html The core API looks _roughly_ like this (correspondingly for `Be`): diff --git a/src/lib.rs b/src/lib.rs index f563cc0..c795fe7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,11 +2,11 @@ //! //! This crate provides the [`Be`] (big-endian) and [`Le`] (little-endian) byte-order-aware numeric types. //! -//! The types aim to provide a similar API to other numeric types from [`core::num`], such as [`NonZero`], [`Saturating`], and [`Wrapping`]. +//! Unlike the popular [`byteorder`] crate, which focuses on the action of encoding and decoding numbers to and from byte streams, this crate focuses on the state of numbers. +//! This is useful to create structs that contain fields of a specific endianness for interoperability, such as in virtio. +//! In comparison to other crates that focus on state, this crate closely follows naming conventions from [`core::num`], has rich functionality, and extensive documentation of each method. //! -//! [`NonZero`]: core::num::NonZero -//! [`Saturating`]: core::num::Saturating -//! [`Wrapping`]: core::num::Wrapping +//! [`byteorder`]: https://docs.rs/byteorder //! //! The core API looks _roughly_ like this (correspondingly for `Be`): //!