Clones this decoder to create a new one with a different decoding function.
Clones this decoder to create a new one with a different decoding function.
This is not meant to be called directly. If you feel you need to, you're probably looking for map.
Decodes encoded data.
Decodes encoded data.
This method is safe, in that it won't throw for run-of-the-mill errors. Unrecoverable errors such as out of memory exceptions are still thrown, but that's considered valid exceptional cases, where incorrectly encoded data is just... normal.
Callers that wish to fail fast and fail hard can use the unsafeDecode method instead.
Creates a new Decoder instance that applies the specified function after decoding.
Creates a new Decoder instance that applies the specified function after decoding.
Decodes encoded data unsafely.
Decodes encoded data unsafely.
The main difference between this and decode is that the former throws exceptions when errors occur where the later safely encodes error conditions in its return type.
Parent trait for all type classes used to decode a useful type from an encoded value.
encoded type - what to decode from.
decoded type - what to decode to.
failure type - how to represent errors.
implementation type - what will be returned by the various map operations.