Add explanation to endian module
This commit is contained in:
1 parent
c82f777290
commit
34b3fc0850
1 file changed
+5
@@ -2,6 +2,11 @@ pub trait ToNativeEndian {
|
||||
fn to_ne(self) -> Self;
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple trait that adds a function to u32/u64 types
|
||||
* to convert a number's endianness to native-endian
|
||||
* based on the platform the code was built for
|
||||
*/
|
||||
impl ToNativeEndian for u32 {
|
||||
#[cfg(target_endian = "big")]
|
||||
fn to_ne(self) -> Self {
|
||||
|
||||
Reference in new issue
Block a user