userver: userver/chaotic/io/userver/ugrpc/client/qos.hpp Source File
Loading...
Searching...
No Matches
qos.hpp
1#pragma once
2
3#include <userver/chaotic/convert/to.hpp>
4#include <userver/ugrpc/client/qos.hpp>
5
6USERVER_NAMESPACE_BEGIN
7
8namespace ugrpc::client {
9
10template <typename T>
11Qos Convert(const T& value, chaotic::convert::To<Qos>) {
12 Qos result;
13 result.timeout = value.timeout_ms;
14 return result;
15}
16
17template <typename T>
18T Convert(const Qos& value, chaotic::convert::To<T>) {
19 T result;
20 result.timeout_ms = value.timeout;
21 return result;
22}
23
24} // namespace ugrpc::client
25
26USERVER_NAMESPACE_END