Module capnp::serialize_packed

source ·
Expand description

Reading and writing of messages using the packed stream encoding.

Functions§

  • Reads a packed message from a stream using the provided options.
  • Like read_message(), but does not allocate. Stores the message in buffer. Returns a BufferNotLargeEnough error if the buffer is not large enough. ALIGNMENT: If the “unaligned” feature is enabled, then there are no alignment requirements on buffer. Otherwise, buffer must be 8-byte aligned (attempts to read the message will trigger errors).
  • Like read_message(), but returns None instead of an error if there are zero bytes left in read.
  • Like try_read_message(), but does not allocate. Stores the message in buffer. Returns a BufferNotLargeEnough error if the buffer is not large enough. ALIGNMENT: If the “unaligned” feature is enabled, then there are no alignment requirements on buffer. Otherwise, buffer must be 8-byte aligned (attempts to read the message will trigger errors).
  • Writes a packed message to a stream.