Closed as not planned
Description
As we discussed here, there is currently no way to define an Array
of a length that doesn't explicitly appear in sizes.rs
(of which there are only 272). For example, a FireSaber public key cannot be created:
type U1472 = typenum::op!(U1000 + U472);
let mut pk: Array<u8, U1472> = Array::default();
This will fail with the error
| let mut pk: Array<u8, U1472> = Array::default();
| ^^^^^^^^^^^^^^^^ the trait `traits::ArraySize` is not implemented for `UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B1>, B1>, B1>, B0>, B0>, B0>, B0>, B0>, B0>`
It isn't clear how to resolve this. Even with macro magic, a downstream crate is not allowed to impl ArraySize
for external types (ie types from typenum
).
Metadata
Metadata
Assignees
Labels
No labels