Rule 160e-dec-bytes
Decoding
(160)
Comments
A byte sequence, and nothing else, decodes at Bytes: is undefined for every JSON value , so a string or an array of numbers sent to a Bytes port is rejected at the boundary.
TeX source
\defnrule[r:e-dec-bytes]
{}
{\Dec{\tBytes}(\effbytes(o_1\cdots o_k))=\dbbin\,[o_1,\ldots,o_k]}Tests (2)
- elm / PortPipeBytesRejectTestA JSON value sent to a `Bytes` port is rejected, whatever it holds.
- elm / PortPipeBytesTestA byte sequence received at `Bytes` goes out again as the same byte sequence.
Discussions
Discuss this rule·Search the discussions on GitHub
Discussions are on GitHub; one about this rule has [r:e-dec-bytes] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.