https://github.com/demindiro/nora_endian
Crate to make dealing with endianness convenient.
https://github.com/demindiro/nora_endian
Last synced: over 1 year ago
JSON representation
Crate to make dealing with endianness convenient.
- Host: GitHub
- URL: https://github.com/demindiro/nora_endian
- Owner: Demindiro
- License: 0bsd
- Created: 2022-07-30T12:21:00.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T13:50:23.000Z (over 3 years ago)
- Last Synced: 2025-02-07T06:26:18.552Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nora endian
[](https://docs.rs/nora_endian)
[](https://crates.io/crates/nora_endian)
[](https://crates.io/crates/nora_endian)
Yet another crate to deal with endianness, though focused on simplicity
## Example
```rust
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;
```