Skip to content

Commit 65e53e0

Browse files
Document future-read-result.cancelled's Canonical ABI encoding. (#542)
* Document `future-read-result.cancelled`'s Canonical ABI encoding. In the Canonical ABI, `future-read-result` has the same encoding as `future-write-result`, even though the `enum`s defined in the documentation have `cancelled` at different indices. Add a sentence to the documentation mentioning this. * Update design/mvp/Explainer.md Co-authored-by: Luke Wagner <[email protected]> --------- Co-authored-by: Luke Wagner <[email protected]>
1 parent 5315943 commit 65e53e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

design/mvp/Explainer.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,9 @@ In the Canonical ABI, the `{readable,writable}-future-end` is passed as an
19191919
`i32` describing the linear memory offset of the
19201920
`{readable,writable}-buffer<T; 1>`. The `option<future-{read,write}-result>`
19211921
return value is bit-packed into the single `i32` return value where
1922-
`0xffff_ffff` represents `none`.
1922+
`0xffff_ffff` represents `none`. And, `future-read-result.cancelled` is encoded
1923+
as the value of `future-write-result.cancelled`, rather than the value implied
1924+
by the `enum` definition above.
19231925

19241926
(See [`canon_future_read`] in the Canonical ABI explainer for details.)
19251927

0 commit comments

Comments
 (0)