Boost.Redis 1.4.2
A redis client library
Loading...
Searching...
No Matches
node.hpp
1/* Copyright (c) 2018-2023 Marcelo Zimbres Silva (mzimbres@gmail.com)
2 *
3 * Distributed under the Boost Software License, Version 1.0. (See
4 * accompanying file LICENSE.txt)
5 */
6
7#ifndef BOOST_REDIS_RESP3_NODE_HPP
8#define BOOST_REDIS_RESP3_NODE_HPP
9
10#include <boost/redis/resp3/type.hpp>
11
12namespace boost::redis::resp3 {
13
27template <class String>
28struct basic_node {
31
33 std::size_t aggregate_size{};
34
36 std::size_t depth{};
37
39 String value{};
40};
41
48template <class String>
50{
51 return a.aggregate_size == b.aggregate_size
52 && a.depth == b.depth
53 && a.data_type == b.data_type
54 && a.value == b.value;
55};
56
61
62} // boost::redis::resp3
63
64#endif // BOOST_REDIS_RESP3_NODE_HPP
type
RESP3 data types.
Definition: type.hpp:23
A node in the response tree.
Definition: node.hpp:28
std::size_t depth
The depth of this node in the response tree.
Definition: node.hpp:36
std::size_t aggregate_size
The number of elements of an aggregate.
Definition: node.hpp:33
type data_type
The RESP3 type of the data in this node.
Definition: node.hpp:30
String value
The actual data. For aggregate types this is usually empty.
Definition: node.hpp:39
auto operator==(basic_node< String > const &a, basic_node< String > const &b)
Compares a node for equality.
Definition: node.hpp:49