Function elem_byte_capacity

Source
pub fn elem_byte_capacity<F: PrimeField>() -> usize
Expand description

Return the number of bytes that can be encoded into a generic [PrimeField] parameter.

Returns the byte length of the [PrimeField] modulus minus 1.

It should be possible to do all this at compile time but I don’t know how. Want to panic on overflow, so use checked arithmetic and type conversion.