Add required `error` method to `Decoder`

Since rustc pull #16130 there has been a new method in the `Decoder`
trait for signalling application-specific decode errors.
This is often a user-facing error message, so perhaps just writing out the error itself?