Debian Codegraph @

third_party/rust/rmp-serde/CHANGELOG.md

raw
1 # Change Log
2 All notable changes to this project will be documented in this file.
3 This project adheres to [Semantic Versioning](http://semver.org/).
4
5 ## [Unreleased][unreleased]
6 ### Added:
7 - Generic `decode::from_read_ref` function that allows to deserialize a borrowed byte-array into the specified type.
8 - Add `Ext` trait for `Serializer` that allows to wrap a serializer with another one, that overrides exactly one serialization policy. For example using `with_struct_map` method it is possible to serialize structs as a MessagePack map with field names, overriding default serialization policy, which emits structs as a tuple.
9 - Add `UnderlyingWrite` trait for `Serializer` and its wrappers to be able to obtain the underlying writer.
10 - Add missing `Debug` implementations.
11 - More `decode::Error` conversions.
12 - Support for serializing and deserializing 128-bit values in serde.
13 - Support for serializing sequences and maps with unknown length, that enables the use of `#[serde(flatten)]` attribute (#196).
14 - Depth limit is now enforced for `Deserializer`.
15
16 ### Changed:
17 - (Breaking) Serialize newtype structs by serializing its inner type without wrapping into a tuple.
18 - (Breaking) Enums are now encoded as a map `{tag: data}` rather than as a list `[tag, data]`. (#149)
19 - Function `encode::to_vec_named` now accepts unsized values.
20 - Renamed `decode::Read` trait to `decode::ReadSlice` to avoid clashing with `std::io::Read` and to specify more precisely what it does.
21 - Support reading encoded integers as floats when safe (#204)
22
23 ### Removed:
24 - Type parameter `VariantWriter` is no longer a type member of `Serializer`. Instead a `Serializer` can be wrapped by another serializer using `with_struct_map`, `with_struct_tuple` etc. methods.
25
26 ### Fixed:
27 - Fix error decoding `Some(enum)` (#185)
28 - Fix error decoding unit structs which were encoded as `[]` (#181)
29 - Fix `Display` implementations for errors not including all relevant information (#199)
30 - Fix deserialization of nested `Option`s (#245)
31
32 ## 0.13.7 - 2017-09-13
33 ### Changed:
34 - `Raw` and `RawRef` are now serializable.
35 - Allow to construct `Raw` and `RawRef` from string or from a byte array.
36
37 ## 0.13.6 - 2017-08-04
38 ### Added:
39 - Serialize struct as a map (#140).
40
41 ## 0.13.5 - 2017-07-21
42 ### Changed
43 - Switch to using `char::encode_utf8`.
44 In Rust 1.15, the function `char::encode_utf8` was stabilized. Assuming that `rmp` follows the `serde` standard of supporting the last 3 stable releases, this function is now safe to use. I believe this removes the last allocation required on the serialization path.
45
46 ## 0.13.4 - 2017-07-11
47 ### Fixed
48 - Fixed build on nightly rustc (#135).
49
50 ## 0.13.3 - 2017-05-27
51 ### Fixed
52 - Fixed build on nightly rustc (#131).
53
54 ## 0.13.2 - 2017-04-30
55 ### Changed
56 - Fixed `rmp_serde::decode::from_read` signature by marking that it can only deserialize into `DeserializeOwned`. The previous signature let try to deserialize, for example `&str` and other borrow types and it failed at runtime instead of catching it at compile time.
57
58 ## 0.13.1 - 2017-04-25
59 ### Added
60 - Add helper `RawRef` struct that allows to deserialize borrowed strings even if they contain invalid UTF-8. This can be when deserializing frames from older MessagePack spec.
61
62 ## 0.13.0 - 2017-04-24
63 ### Added
64 - Zero-copy deserialization from `&[u8]`.
65
66 ### Changed
67 - Adapt with serde 1.0.
68
69 ## 0.12.4 - 2017-03-26
70 ### Fixed
71 - Fix compilation on rustc 1.13.
72
73 ## 0.12.3 - 2017-03-26
74 ### Added
75 - Add helper `Raw` struct that allows to deserialize strings even if they contain invalid UTF-8. This can be when deserializing frames from older MessagePack spec.
76 - Serializer can now return back its underlying writer by reference, mutable reference and by value.
77
78 ## 0.12.2 - 2017-02-17
79 ### Added
80 - Added `write`, `to_vec` and `from_read` functions to reduce boilerplate for serializing and deserializing custom types that implement `Serialize` or `Deserialize`.
81
82 ## 0.12.1 - 2017-02-11
83 ### Added
84 - Allow `Deserializer` to return number of bytes read in case of using Cursor as an underlying reader.
85
86 ## 0.12.0 - 2017-02-08
87 ### Changed
88 - Adapt with serde 0.9.
89
90 ## 0.11.0 - 2017-01-05
91 ### Changed
92 - Adapt with RMP core 0.8.
93 - The `Serializer` now encodes integers using the most effective representation.
94 - The `Deserializer` now properly decodes integer values that fit in the expected type.
95 - Default stack protector depth is now 1024 instead of 1000.
96 - Internal buffer in the `Deserializer` now have some capacity preallocated.
97
98 ## 0.10.0 - 2016-10-06
99 ### Changed
100 - Update serde dependency to 0.8.
101
102 ## 0.9.6 - 2016-08-05
103 ### Fixed
104 - Switch unit structs to using the same serialization mechanism as other structs (#76).
105
106 ## 0.9.5 - 2016-07-28
107 ### Added
108 - Added a wrapper over `rmp::Value` to be able to serialize it.
109
110 ## 0.9.4 - 2016-07-11
111 ### Fixed
112 - Reading binary should no longer trigger unexpected EOF error on valid read.
113
114 ## 0.9.3 - 2016-07-11
115 ### Changed
116 - Reuse deserializer buffer on every read for string and binary deserialization without unnecessary intermediate buffer creation.
117 This change increases the string and binary deserialization performance (many thanks to Fedor Gogolev <[email protected]>).
118
119 ## 0.9.2 - 2016-07-03
120 ### Added
121 - Implement `size_hint()` function for `SeqVisitor` and `MapVisitor`, so it can be possible to preallocate things, increasing the performance greatly.
122
123 ## 0.9.1 - 2016-06-24
124 ### Fixed
125 - Serializer should no longer panic with unimplemented error on struct variant serialization ([#64]).
126
127 ## 0.9.0 - 2016-03-28
128 ### Changed
129 - Adapt code to be compilable with Serde v0.7.
130
131 ## 0.8.2 - 2015-11-10
132 ### Changed
133 - Fixed stack overflow when unpacking recursive data structures.
134
135 ## 0.8.1 - 2015-10-03
136 ### Changed
137 - Upper limit for serde version.
138
139 ### Fixed
140 - Use the most effective int encoding
141 Even if the value is explicitly marked as i64 it must be encoded using
142 the most effective bytes representation despite of signed it or
143 unsigned.
144
145 ## 0.8.0 - 2015-09-11
146 ### Changed
147 - Serializer can now be extended with custom struct encoding policy.
148 - Improved error types and its messages for serialization part.
149 - New error type introduced - UnknownLength. Returned on attempt to serialize struct, map or serquence with unknown
150 length (Serde allows this).
151 - The new type is returned if necessary.
152
153 ### Fixed
154 - Deserializer now properly works with enums.
155 - Options with default values (that can be initialized using unit marker) deserialization.
156 This fix also forbids the following Option deserialization cases:
157 - Option<()>.
158 - Option<Option<...>>.
159 It's impossible to properly deserialize the listed cases without explicit option marker in protocol.
160 - Serializer now properly serializes unit structs.
161 Previously it was serialized as a unit (nil), now there is just an empty array ([]).
162
163 [#64]: (https://github.com/3Hren/msgpack-rust/pull/64)
164 [#76]: (https://github.com/3Hren/msgpack-rust/pull/76)