aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/ipmath/ipmath.h
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-21 15:05:38 +0100
committerGitHub <noreply@github.com>2023-12-21 15:05:38 +0100
commite98bcbc74422492351c51646dba3849a138a8ffc (patch)
tree38ad7a09b1f9c201ce8a7e3d69f2017388769224 /library/cpp/ipmath/ipmath.h
parent559d7083cd8378cb25b9e966dedcca21d413e338 (diff)
downloadydb-e98bcbc74422492351c51646dba3849a138a8ffc.tar.gz
Import libs 1 (#590)
* Import libs 1 * Add new file without extension * Add file missed in export config
Diffstat (limited to 'library/cpp/ipmath/ipmath.h')
-rw-r--r--library/cpp/ipmath/ipmath.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/ipmath/ipmath.h b/library/cpp/ipmath/ipmath.h
index b6df5416f8..f1c15e341e 100644
--- a/library/cpp/ipmath/ipmath.h
+++ b/library/cpp/ipmath/ipmath.h
@@ -19,11 +19,11 @@ public:
TIpAddressRange() = default;
TIpAddressRange(TIpv6Address start, TIpv6Address end);
- TIpAddressRange(const TString& start, const TString& end);
+ TIpAddressRange(const TStringBuf start, const TStringBuf end);
~TIpAddressRange();
static TIpAddressRangeBuilder From(TIpv6Address from);
- static TIpAddressRangeBuilder From(const TString& from);
+ static TIpAddressRangeBuilder From(const TStringBuf from);
/**
* Parses a string tormatted in Classless Iter-Domain Routing (CIDR) notation.
@@ -31,8 +31,8 @@ public:
* @return a new TIpAddressRange
* @throws TInvalidIpRangeException if the string cannot be parsed.
*/
- static TIpAddressRange FromCidrString(const TString& str);
- static TMaybe<TIpAddressRange> TryFromCidrString(const TString& str);
+ static TIpAddressRange FromCidrString(const TStringBuf str);
+ static TMaybe<TIpAddressRange> TryFromCidrString(const TStringBuf str);
/**
* Parses a string formatted as two dash-separated addresses.
@@ -40,8 +40,8 @@ public:
* @return a new TIpAddressRange
* @throws TInvalidIpRangeException if the string cannot be parsed.
*/
- static TIpAddressRange FromRangeString(const TString& str);
- static TMaybe<TIpAddressRange> TryFromRangeString(const TString& str);
+ static TIpAddressRange FromRangeString(const TStringBuf str);
+ static TMaybe<TIpAddressRange> TryFromRangeString(const TStringBuf str);
TString ToRangeString() const;
@@ -50,8 +50,8 @@ public:
* @return a new TIpAddressRange
* @throws TInvlidIpRangeException if the string doesn't match any known format or if parsing failed.
*/
- static TIpAddressRange FromString(const TString& str);
- static TMaybe<TIpAddressRange> TryFromString(const TString& str);
+ static TIpAddressRange FromString(const TStringBuf str);
+ static TMaybe<TIpAddressRange> TryFromString(const TStringBuf str);
TIpType Type() const;
@@ -114,7 +114,7 @@ class TIpAddressRange::TIpAddressRangeBuilder {
friend class TIpAddressRange;
TIpAddressRangeBuilder() = default;
TIpAddressRangeBuilder(TIpv6Address from);
- TIpAddressRangeBuilder(const TString& from);
+ TIpAddressRangeBuilder(const TStringBuf from);
TIpAddressRangeBuilder(const TIpAddressRangeBuilder&) = default;
TIpAddressRangeBuilder& operator=(const TIpAddressRangeBuilder&) = default;
@@ -125,7 +125,7 @@ public:
operator TIpAddressRange();
TIpAddressRange Build();
- TIpAddressRangeBuilder& To(const TString&);
+ TIpAddressRangeBuilder& To(const TStringBuf);
TIpAddressRangeBuilder& To(TIpv6Address);
TIpAddressRangeBuilder& WithPrefix(ui8 len);