Expand description
Envelope encoding shared by the page and the worker: every
postMessage is a plain object whose fields are the
crate::wire::MESSAGE_KEY control message or the
crate::wire::APP_KEY application message, plus optional
crate::wire::ATTACHMENTS_KEY binary payloads whose buffers ride the
transfer list.
Functionsยง
- app_
value_ from - Decodes the application message riding
data, if any. - attach
- Adds named binary payloads to
envelopeand their buffers totransfer. Returns false when the attachment bag could not be written. - attachments_
from - Decodes the named binary attachments riding
data, empty when none did. - control_
value_ from - Decodes the control message riding
data, if any. - envelope_
with - Builds an envelope carrying
messageunderkey, orNonewhen the message does not serialize.