diff options
| author | Michael Neumann <mneumann@ntecs.de> | 2012-12-27 06:16:16 -0600 |
|---|---|---|
| committer | Michael Neumann <mneumann@ntecs.de> | 2012-12-27 06:16:16 -0600 |
| commit | 2b6c456bf648e5a7b408b550649d409378e39539 (patch) | |
| tree | 5a4ed572b84482f9003de920ea0580aae2fe6277 /src/rt/rust.cpp | |
| parent | 09bb07bed9166105ea961a42b5fff7739ae0d2e9 (diff) | |
| download | rust-2b6c456bf648e5a7b408b550649d409378e39539.tar.gz rust-2b6c456bf648e5a7b408b550649d409378e39539.zip | |
Enhance auto_encode to take number of struct fields
emit_struct and read_struct takes an additional len:uint parameter which tells us how many fields the struct we are working on has. This is required to implement an Encoder for the msgpack [1] serialization format. To serialize a struct with msgpack you have to use arrays and the size of the array has to be know before each of the elements are written out. JSON as an example doesn't have this problem as it uses '[' and ']' delimiters for arrays. [1]: www.msgpack.org
Diffstat (limited to 'src/rt/rust.cpp')
0 files changed, 0 insertions, 0 deletions
