rust/src/libserialize
Andrew Poelstra 5bd8edc112 libserialize: add error() to Decoder
A quick and dirty fix for #15036 until we get serious decoder reform.

Right now it is impossible for a Decodable to signal a decode error,
for example if it has only finitely many allowed values, is a string
which must be encoded a certain way, needs a valid checksum, etc. For
example in the libuuid implementation of Decodable an Option is
unwrapped, meaning that a decode of a malformed UUID will cause the
task to fail.

Since this adds a method to the `Decoder` trait, all users will need
to update their implementations to add it. The strategy used for the
current implementations for JSON and EBML is to add a new entry to
the error enum `ApplicationError(String)` which stores the string
provided to `.error()`.

[breaking-change]
2014-07-31 21:41:19 -07:00
..
base64.rs Deprecated str::raw::from_utf8_owned 2014-07-24 07:25:43 -07:00
collection_impls.rs Convert some push_back users to push 2014-07-23 13:20:16 -07:00
hex.rs Deprecated str::raw::from_utf8_owned 2014-07-24 07:25:43 -07:00
json.rs libserialize: add error() to Decoder 2014-07-31 21:41:19 -07:00
lib.rs remove serialize::ebml, add librbml 2014-07-31 07:30:49 -07:00
serialize.rs libserialize: add error() to Decoder 2014-07-31 21:41:19 -07:00