aligned-utils

Crates.ioaligned-utils
lib.rsaligned-utils
version1.0.2
sourcesrc
created_at2020-12-31 14:43:10.621078
updated_at2021-02-27 09:40:09.406901
descriptionCommon utilities to work with aligned values and allocation
homepage
repositoryhttps://github.com/datenlord/aligned-utils
max_upload_size
id329752
size19,268
(Nugine)

documentation

README

aligned-utils

Crates.io MIT licensed Docs CI

Common utilities to work with aligned values and allocation.

Example

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;
Commit count: 38

cargo fmt