Boost.Redis 1.4.2
A redis client library
Loading...
Searching...
No Matches
adapt.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_ADAPTER_ADAPT_HPP
8#define BOOST_REDIS_ADAPTER_ADAPT_HPP
9
10#include <boost/redis/resp3/node.hpp>
11#include <boost/redis/response.hpp>
12#include <boost/redis/adapter/detail/result_traits.hpp>
13#include <boost/redis/adapter/detail/response_traits.hpp>
14#include <boost/mp11.hpp>
15#include <boost/system.hpp>
16
17#include <tuple>
18#include <limits>
19#include <string_view>
20#include <variant>
21
22namespace boost::redis::adapter
23{
24
37template<class T>
38auto boost_redis_adapt(T& t) noexcept
39{
40 return detail::response_traits<T>::adapt(t);
41}
42
74template<class T>
75auto adapt2(T& t = redis::ignore) noexcept
76 { return detail::result_traits<T>::adapt(t); }
77
78} // boost::redis::adapter
79
80#endif // BOOST_REDIS_ADAPTER_ADAPT_HPP
ignore_t ignore
Global ignore object.
auto adapt2(T &t=redis::ignore) noexcept
Adapts user data to read operations.
Definition: adapt.hpp:75