Skip to content
Snippets Groups Projects
Commit 8331824b authored by Ilya Bobyr's avatar Ilya Bobyr Committed by CQ bot account: commit-bot@chromium.org
Browse files

[fidl][rust] Decoding position, padding helpers

For padding purposes and for error reporting, it is necessary to know
current decoding position in the buffer.

Also add helper functions to generate and check padding.

Encoders now use `padding` in case when the are emitting padding.
Unfortunately, decoders can not switch to `Decoder::padding` yet, as it
also makes sure the bytes are indeed zeroes, and not all the other
language bindings are using zeros all the time.

I kept `next_slice` and added a comment with a reference to FIDL-598 in
the decoders code.

FIDL-598 #comment

Change-Id: Iec87ac622e793ea6741ad4df80a3e2345213d820
parent 2c6f3ed6
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment