userver
C++ Async Framework
Loading...
Searching...
No Matches
boost_uuid.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/formats/serialize/boost_uuid.hpp
4
/// @brief boost::uuids::uuid serializer to any format
5
/// @ingroup userver_universal userver_formats_serialize
6
7
#
include
<
boost
/
uuid
/
uuid
.
hpp
>
8
#
include
<
string
>
9
10
#
include
<
userver
/
formats
/
serialize
/
to
.
hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
formats::
serialize
{
15
16
namespace
detail {
17
18
std::string ToString(
const
boost::
uuids
::uuid& value);
19
20
}
// namespace detail
21
22
/// Outputs UUID in format: 12345678-1234-1234-1234-123412345678
23
template
<
typename
Value>
24
Value
Serialize
(
const
boost::
uuids
::uuid& value, To<Value>) {
25
return
typename
Value::Builder(detail::ToString(value)).ExtractValue();
26
}
27
28
template
<
typename
StringBuilder>
29
void
WriteToStream(
const
boost::
uuids
::uuid& value, StringBuilder& sw) {
30
WriteToStream(detail::ToString(value), sw);
31
}
32
33
}
// namespace formats::serialize
34
35
USERVER_NAMESPACE_END
userver
formats
serialize
boost_uuid.hpp
Generated on Thu May 21 2026 16:22:33 for userver by
Doxygen
1.13.2