A stored format of a value. decode reads data that crossed a trust boundary, so it
returns a Result. A codec obeys two laws. Decoding what encode wrote gives the value
back. Encoding what decode read and decoding the result again gives the same value.
Both members are functions that work on their own, so decode serves as the decoder of a
field of a larger format.
A stored format of a value.
decodereads data that crossed a trust boundary, so it returns aResult. A codec obeys two laws. Decoding whatencodewrote gives the value back. Encoding whatdecoderead and decoding the result again gives the same value.Both members are functions that work on their own, so
decodeserves as the decoder of a field of a larger format.