Paper wallet for Hush, which you can use with no internet access while wearing a tinfoil hat inside of a Faraday cage.
https://hush.is
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jahway603
9a2d84a48f
|
1 year ago | |
---|---|---|
.. | ||
src | 1 year ago | |
tests | 1 year ago | |
.cargo-checksum.json | 1 year ago | |
Cargo.toml | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
rustfmt.toml | 1 year ago |
README.md
generic-array
This crate implements generic array types for Rust.
Usage
The Rust arrays [T; N]
are problematic in that they can't be used generically with respect to N
, so for example this won't work:
struct Foo<N> {
data: [i32; N]
}
generic-array defines a new trait ArrayLength<T>
and a struct GenericArray<T, N: ArrayLength<T>>
, which let the above be implemented as:
struct Foo<N: ArrayLength<i32>> {
data: GenericArray<i32, N>
}
To actually define a type implementing ArrayLength
, you can use unsigned integer types defined in typenum crate - for example, GenericArray<T, U5>
would work almost like [T; 5]
:)
In version 0.1.1 an arr!
macro was introduced, allowing for creation of arrays as shown below:
let array = arr![u32; 1, 2, 3];
assert_eq!(array[2], 3);