userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
bytes_per_second.hpp
Go to the documentation of this file.
1
#pragma once
2
6
7
#include <string>
8
9
#include <
userver/formats/parse/to.hpp
>
10
11
USERVER_NAMESPACE_BEGIN
12
13
namespace
utils
{
14
18
enum class
BytesPerSecond
:
long
long
{};
19
20
constexpr
long
long
ToLongLong(
BytesPerSecond
x) {
return
static_cast<
long
long
>
(x); }
21
22
constexpr
bool
operator==(
BytesPerSecond
lhs,
BytesPerSecond
rhs) {
return
ToLongLong(lhs) == ToLongLong(rhs); }
23
26
BytesPerSecond
StringToBytesPerSecond
(
const
std::string& data);
27
28
template
<
class
Value>
29
BytesPerSecond
Parse
(
const
Value& v,
formats::parse::To<BytesPerSecond>
) {
30
return
utils::StringToBytesPerSecond
(v.template As<std::string>());
31
}
32
33
}
// namespace utils
34
35
USERVER_NAMESPACE_END
userver
utils
bytes_per_second.hpp
Generated on
for userver by
Doxygen
1.17.0