transvec
transvec is a crate for transmuting Vecs without copying.
Installation
Add this to your Cargo.toml:
[]
= "0.3.1"
Usage
use transmute_vec;
let input: = vec!;
let output: = transmute_vec.unwrap;
Nightly
This is nightly because it's blocked on the allocator_api, which is how this crate can get around the aligment issue.
You can however turn off default features to make it work on stable, with the only options being transmute_vec_basic and transmute_vec_basic_may_copy.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.