Crates.io | nora_endian |
lib.rs | nora_endian |
version | 0.1.2 |
source | src |
created_at | 2022-07-30 12:36:32.486774 |
updated_at | 2022-07-30 12:42:31.096469 |
description | Crate to make dealing with endianness convenient. |
homepage | |
repository | https://github.com/Demindiro/nora_endian |
max_upload_size | |
id | 635471 |
size | 7,148 |
Yet another crate to deal with endianness, though focused on simplicity
use nora_endian::u32le;
let flags = u32le::from(1234);
let index = u32le::from(0);
// Easy operations on & comparisons between le/be and native types
if flags & 1 == 0 {
// ...
}
let index_plus_one_u32: u32 = 1 + index;
let index_plus_one_u32le: u32le = index + 1;