Aaron Turon c353de13fc Reintroduce "decoder" and "encoder" for Decode and Encode, and merge the
traits into `Codec`

A previous commit refactored such that `Encode` and `Decode` are
implemented directly on the types being encoded or decoded. This was
thought to be less expressive but more convenient than having a separate
notion of a (stateful) encoder or decoder.

However, there are certain situations where the approach is just too
limiting: you're required to implemented `Decode` and `Encode` for types
you don't "own" and can't newtype.

This commit moves back to a setup where `Self` represents the
encoder/decoder state; it also merges the two traits into a single
`Codec` trait, since they are currently always used together.
2016-11-15 08:28:26 -08:00
..
2016-09-07 22:12:41 -07:00
2016-09-07 22:12:41 -07:00
2016-09-07 22:12:41 -07:00
2016-09-07 22:12:41 -07:00
2016-09-07 22:12:41 -07:00
2016-09-07 22:12:41 -07:00
2016-09-07 22:12:41 -07:00