about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorMichael Neumann <mneumann@ntecs.de>2012-12-27 06:16:16 -0600
committerMichael Neumann <mneumann@ntecs.de>2012-12-27 06:16:16 -0600
commit2b6c456bf648e5a7b408b550649d409378e39539 (patch)
tree5a4ed572b84482f9003de920ea0580aae2fe6277 /src/rt/rust_kernel.cpp
parent09bb07bed9166105ea961a42b5fff7739ae0d2e9 (diff)
downloadrust-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_kernel.cpp')
0 files changed, 0 insertions, 0 deletions