userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
time_of_day.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/formats/serialize/time_of_day.hpp
4
/// @brief utils::datetime::TimeOfDay to any format
5
/// @ingroup userver_universal userver_formats_serialize
6
7
#
include
<
fmt
/
format
.
h
>
8
9
#
include
<
userver
/
utils
/
time_of_day
.
hpp
>
10
11
#
include
<
userver
/
formats
/
serialize
/
to
.
hpp
>
12
13
USERVER_NAMESPACE_BEGIN
14
15
namespace
formats::
serialize
{
16
17
template
<
typename
Value,
typename
Duration>
18
Value Serialize(
const
utils
::
datetime
::TimeOfDay<Duration>& value,
To
<Value>) {
19
return
typename
Value::Builder(fmt::to_string(value)).ExtractValue();
20
}
21
22
template
<
typename
Value,
typename
Duration,
typename
StringBuilder>
23
void
WriteToStream(
const
utils
::
datetime
::TimeOfDay<Duration>& value, StringBuilder& sw) {
24
WriteToStream(fmt::to_string(value), sw);
25
}
26
27
}
// namespace formats::serialize
28
29
USERVER_NAMESPACE_END
userver
formats
serialize
time_of_day.hpp
Generated on
for userver by
Doxygen
1.17.0