CCF
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions
cbor.h File Reference
#include <cstdint>
#include <exception>
#include <memory>
#include <span>
#include <string>
#include <variant>
#include <vector>

Go to the source code of this file.

Classes

struct  ccf::cbor::Array
 
struct  ccf::cbor::Map
 
struct  ccf::cbor::Tagged
 
struct  ccf::cbor::ValueImpl
 

Namespaces

namespace  ccf
 
namespace  ccf::cbor
 

Typedefs

using ccf::cbor::Value = std::unique_ptr< ValueImpl >
 
using ccf::cbor::Unsigned = uint64_t
 
using ccf::cbor::Signed = int64_t
 
using ccf::cbor::Bytes = std::span< const uint8_t >
 
using ccf::cbor::String = std::string_view
 
using ccf::cbor::Simple = uint8_t
 
using ccf::cbor::Type = std::variant< Unsigned, Signed, Bytes, String, Array, Map, Tagged, Simple >
 
using ccf::cbor::CBORDecodeError = std::runtime_error
 

Functions

Value ccf::cbor::make_unsigned (uint64_t value)
 
Value ccf::cbor::make_signed (int64_t value)
 
Value ccf::cbor::make_string (std::string_view data)
 
Value ccf::cbor::parse_value (std::span< const uint8_t > raw, std::string_view context)
 
std::string ccf::cbor::print_value (const Value &value, size_t indent)