pub fn encode_with_padding<V: Source>(
ast: &Ast,
request: &ProbeRequest,
values: &V,
) -> Result<(Vec<u8>, Vec<bool>), ProbeError>Expand description
As encode, and the offsets of the octets that carry no value.
The second half of the answer is computed by the layout, not by
comparing the result with anything: Writer::align_to is the one
place the walk emits a byte that XTypes 1.3 §7.4.1’s alignment rules
put there instead of a value, and the writer notes each span it
emits. The result is a mask over the returned byte string, one entry
per octet, true where the plan says padding.
The interop comparison uses it to check its own octet rule: a peer’s
differing octet that lands outside this mask is a difference in a
value, whatever it looks like. See
tools/interop-results/src/rust_column.rs.
§Errors
As encode. Emit::KeyHash has no padding mask — the holder is a
separate stream — and yields an all-false one.