We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
const fn
Uint::to_le_bytes
1 parent a663070 commit 313505fCopy full SHA for 313505f
1 file changed
src/uint/macros.rs
@@ -40,6 +40,11 @@ macro_rules! impl_uint_aliases {
40
pub const fn to_be_bytes(&self) -> [u8; $bits / 8] {
41
encoding::uint_to_be_bytes::<{ nlimbs!($bits) }, { $bits / 8 }>(self)
42
}
43
+
44
+ /// Serialize as little endian bytes.
45
+ pub const fn to_le_bytes(&self) -> [u8; $bits / 8] {
46
+ encoding::uint_to_le_bytes::<{ nlimbs!($bits) }, { $bits / 8 }>(self)
47
+ }
48
49
50
impl Encoding for $name {
0 commit comments