This crate has a single macro, newtype_arrays
, that will create transparent newtypes for arrays,
and implement standard traits for them. It will be redundant when generic cosntants land, in the
mean time it means you can use large arrays on stable rust.
Examples
extern crate newtype_array;
use HashMap;
// Sha385 length
newtype_array!;
// Sha512 length
newtype_array!;
// We've got `Clone` and `PartialEq`/`Eq`
let arr1 = Array48;
let arr2 = arr1.clone;
assert_eq!;
// `Hash` is implemented as well
let mut map = new;
map.insert;