A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
Loading...
Searching...
No Matches
a11::data::MsgpackWriter Class Reference

Incrementally encode the fields of one A11 wire record. More...

#include <cpp/a11/data/msgpack.h>

Public Member Functions

absl::Status Pack (const nlohmann::json &value)
 Append a JSON-compatible field to the encoded record.
 
const std::string & bytes () const
 View the encoded bytes without transferring ownership.
 
std::string TakeBytes ()
 Transfer the encoded bytes out of this writer.
 

Detailed Description

Incrementally encode the fields of one A11 wire record.

A11 records are sequences of MessagePack objects, not one enclosing array; the matching MsgpackReader therefore also rejects trailing fields.

Member Function Documentation

◆ bytes()

const std::string & a11::data::MsgpackWriter::bytes ( ) const
inline

View the encoded bytes without transferring ownership.

◆ Pack()

absl::Status a11::data::MsgpackWriter::Pack ( const nlohmann::json &  value)

Append a JSON-compatible field to the encoded record.

◆ TakeBytes()

std::string a11::data::MsgpackWriter::TakeBytes ( )
inline

Transfer the encoded bytes out of this writer.


The documentation for this class was generated from the following files: