Boost.Redis: include/boost/redis/adapter/ignore.hpp Source File

Boost.Redis 1.84.0 A redis client library

Loading...
Searching...
No Matches
ignore.hpp
1/* Copyright (c) 2018-2024 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_ADAPTER_IGNORE_HPP
8#define BOOST_REDIS_ADAPTER_IGNORE_HPP
9
10#include <boost/redis/resp3/node.hpp>
11#include <boost/redis/error.hpp>
12#include <boost/system/error_code.hpp>
13#include <string>
14
15namespace boost::redis::adapter
16{
17
23 struct ignore {
24 void operator()(resp3::basic_node<std::string_view> const& nd, system::error_code& ec)
25 {
26 switch (nd.data_type) {
27 case resp3::type::simple_error: ec = redis::error::resp3_simple_error; break;
28 case resp3::type::blob_error: ec = redis::error::resp3_blob_error; break;
29 case resp3::type::null: ec = redis::error::resp3_null; break;
30 default:;
31 }
32 }
33};
34
35} // boost::redis::adapter
36
37#endif // BOOST_REDIS_ADAPTER_IGNORE_HPP
boost::redis::resp3::type::null
@ null
Simple.
boost::redis::resp3::type::simple_error
@ simple_error
Simple.
boost::redis::resp3::type::blob_error
@ blob_error
Simple.
boost::redis::error::resp3_blob_error
@ resp3_blob_error
Got RESP3 blob_error.
boost::redis::error::resp3_null
@ resp3_null
Got RESP3 null.
boost::redis::error::resp3_simple_error
@ resp3_simple_error
Got RESP3 simple error.
boost::redis::adapter::ignore
An adapter that ignores responses.
Definition ignore.hpp:23
boost::redis::resp3::basic_node
A node in the response tree.
Definition node.hpp:28
boost::redis::resp3::basic_node::data_type
type data_type
The RESP3 type of the data in this node.
Definition node.hpp:30