boost_redis 1.4.2
A redis client library
boost::redis::resp3::basic_node< String > Struct Template Reference

A node in the response tree. More...

#include <include/boost/redis/resp3/node.hpp>

Public Attributes

std::size_t aggregate_size {}
 The number of elements of an aggregate.
 
type data_type = type::invalid
 The RESP3 type of the data in this node.
 
std::size_t depth {}
 The depth of this node in the response tree.
 
String value {}
 The actual data. For aggregate types this is usually empty.
 

Related Functions

(Note that these are not member functions.)

template<class String >
auto operator== (basic_node< String > const &a, basic_node< String > const &b)
 Compares a node for equality. More...
 

Detailed Description

template<class String>
struct boost::redis::resp3::basic_node< String >

A node in the response tree.

RESP3 can contain recursive data structures: A map of sets of vector of etc. As it is parsed each element is passed to user callbacks (push parser). The signature of this callback is f(resp3::node<std::string_view). This class is called a node because it can be seen as the element of the response tree. It is a template so that users can use it with owing strings e.g. std::string or boost::static_string etc.

Template Parameters
StringA std::string-like type.

Definition at line 28 of file node.hpp.

Friends And Related Function Documentation

◆ operator==()

template<class String >
auto operator== ( basic_node< String > const &  a,
basic_node< String > const &  b 
)
related

Compares a node for equality.

Parameters
aLeft hand side node object.
bRight hand side node object.

Definition at line 49 of file node.hpp.


The documentation for this struct was generated from the following file: