| Crates.io | aligned-utils |
| lib.rs | aligned-utils |
| version | 1.0.2 |
| created_at | 2020-12-31 14:43:10.621078+00 |
| updated_at | 2021-02-27 09:40:09.406901+00 |
| description | Common utilities to work with aligned values and allocation |
| homepage | |
| repository | https://github.com/datenlord/aligned-utils |
| max_upload_size | |
| id | 329752 |
| size | 19,268 |
Common utilities to work with aligned values and allocation.
use aligned_utils::stack::Align8;
let mut arr = Align8([1, 2, 3]);
let bytes: &[u8] = &*arr;
use aligned_utils::bytes::AlignedBytes; // with feature "alloc"
let mut bytes = AlignedBytes::new_zeroed(1024, 8);
let buf: &mut [u8] = &mut *bytes;