aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/misc/guid.cpp
diff options
context:
space:
mode:
authorbabenko <babenko@yandex-team.com>2023-11-25 17:05:18 +0300
committerbabenko <babenko@yandex-team.com>2023-11-25 17:31:15 +0300
commitef0f7daa4fdd7a8866514cdd37dafdb5ceaa9724 (patch)
tree1fbfae235497e65647a2078d38b50eaec157367e /library/cpp/yt/misc/guid.cpp
parent6f361c0dc7ed733827aa265049b1204b54292e2e (diff)
downloadydb-ef0f7daa4fdd7a8866514cdd37dafdb5ceaa9724.tar.gz
More TGuid helpers
Diffstat (limited to 'library/cpp/yt/misc/guid.cpp')
-rw-r--r--library/cpp/yt/misc/guid.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/library/cpp/yt/misc/guid.cpp b/library/cpp/yt/misc/guid.cpp
index 882787d7a2..02c396b015 100644
--- a/library/cpp/yt/misc/guid.cpp
+++ b/library/cpp/yt/misc/guid.cpp
@@ -200,4 +200,15 @@ char* WriteGuidToBuffer(char* ptr, TGuid value)
////////////////////////////////////////////////////////////////////////////////
+TFormattableGuid::TFormattableGuid(TGuid guid)
+ : End_(WriteGuidToBuffer(Buffer_.data(), guid))
+{ }
+
+TStringBuf TFormattableGuid::ToStringBuf() const
+{
+ return {Buffer_.data(), End_};
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
} // namespace NYT