Now we have an Encodable trait with two methods: encode and encoded_length. But in almost cases we don't need to have encoded_length. It is used in some places in zkvm. Solution is to create new trait KnownLength, which has method encoded_length, and implement this trait for those structures which really need to have this method.
Now we have an
Encodable
trait with two methods:encode
andencoded_length
. But in almost cases we don't need to haveencoded_length
. It is used in some places in zkvm. Solution is to create new traitKnownLength
, which has methodencoded_length
, and implement this trait for those structures which really need to have this method.