userver: userver/utils/boost_uuid7.hpp Source File
Loading...
Searching...
No Matches
boost_uuid7.hpp
1#pragma once
2
3/// @file userver/utils/boost_uuid7s.hpp
4/// @brief @copybrief utils::generators::GenerateBoostUuidV7()
5
6#include <boost/uuid/uuid.hpp>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace utils::generators {
11
12/// @brief Generates UUIDv7
13///
14/// Uses 22-bit counter to ensure UUID's monotonicity in generated batches (or
15/// for UUID's generated for the same timestamp). See RFC for detailed UUID
16/// format info:
17/// https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#name-uuid-version-7
18boost::uuids::uuid GenerateBoostUuidV7();
19
20} // namespace utils::generators
21
22USERVER_NAMESPACE_END