Skip to content

Commit 8c2d1b7

Browse files
committed
add a bit of endianness struct docs
1 parent df739a8 commit 8c2d1b7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/num.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,11 @@ where
873873
}
874874

875875
macro_rules! decl_endian_structs {
876-
{ $($struct:ident $from:ident $into:ident)* } => {
876+
{ $($endian_str:literal $struct:ident $from:ident $into:ident)* } => {
877877
$(
878+
/// Implements [`Endian`] trait and provides
879+
#[doc = $endian_str]
880+
/// conversions between numbers and arrays
878881
pub struct $struct {
879882
__private: ()
880883
}
@@ -898,9 +901,9 @@ macro_rules! decl_endian_structs {
898901
}
899902

900903
decl_endian_structs! {
901-
EndianLittle from_le_bytes into_le_bytes
902-
EndianBig from_be_bytes into_be_bytes
903-
EndianNative from_ne_bytes into_ne_bytes
904+
"little endian" EndianLittle from_le_bytes into_le_bytes
905+
"big endian" EndianBig from_be_bytes into_be_bytes
906+
"native endian" EndianNative from_ne_bytes into_ne_bytes
904907
}
905908

906909
/*

0 commit comments

Comments
 (0)