Skip to main content

Module io

Module io 

Source
Expand description

Stream framing and message I/O.

Traits§

AsyncStream
A bidirectional byte stream capable of carrying RPC messages.

Functions§

read_message
Reads one Cap’n Proto message (including its segment table) from the stream.
serialize_message
Serializes a Cap’n Proto message (including its segment table) to framed bytes. Synchronous so no non-Send capnp builder state is held across an await; write the result with write_raw.
write_raw
Writes already-framed bytes (as produced by serialize::write_message_to_words) to the stream.