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.