Function zksync_protobuf::encode
source · pub fn encode<T: ProtoFmt>(x: &T) -> Vec<u8> ⓘ
Expand description
Encodes a proto message.
Currently it outputs a canonical encoding, but decode
accepts
non-canonical encoding as well.
It would simplify invariants if we required all messages to be canonical,
but we will see whether it is feasible once we have an RPC framework
in place.