Functions and classes that could be used with or without coroutine environment.
Those classes and functions reside in CMake target userver-universal, that is a base target for all the userver-* targets, so all these the classes and functions are available while using any of the userver parts.
Files | |
| file | using_namespace_userver.hpp |
For samples and snippets only! Has a using namespace / USERVER_NAMESPACE; if the USERVER_NAMESPACE is not empty. | |
| file | merge_schemas.hpp |
| Merge parent and child components schemas of static configs. | |
| file | assert.hpp |
| Assertion macros UASSERT, UASSERT_MSG, UINVARIANT and AbortWithStacktrace() function. | |
| file | assert_macros.hpp |
| Extensions to the gtest macros for printing and testing exceptions that could work even without coroutine environment. | |
| file | rand.hpp |
| Random number generators. | |
| file | common_containers.hpp |
| Parsers and converters for Standard Library containers and std::optional. | |
| file | common_containers.hpp |
| Serializers for standard containers and optional. | |
| file | meta_light.hpp |
| Lightweight concepts. | |
| file | death_tests.hpp |
| Contains facilities for testing service crashes. | |
| file | to.hpp |
| Helper for parsers. | |
| file | to.hpp |
| Helper for serializers. | |
| file | meta.hpp |
| Metaprogramming helpers for converters detection. | |
| file | hex.hpp |
| Encoders, decoders and helpers for hexadecimal representations. | |
| file | common.hpp |
| Parsers and converters for std::chrono::seconds, std::chrono::system_clock::time_point and integral types. | |
| file | select.hpp |
| Utilities for selection of platform specific values. | |
| file | meta.hpp |
| Metaprogramming, template variables and concepts. | |
| file | base64.hpp |
| Cryptographic hashing. | |
| file | hash.hpp |
| Cryptographic hashing. | |
| file | datetime_light.hpp |
| Date and Time related converters. | |
| file | mock_now.hpp |
| Mocking and getting mocked time values. | |
| file | algo.hpp |
| Small useful algorithms. | |
| file | datetime.hpp |
| Date, Time, and Timezone related converters. | |
| file | from_string.hpp |
| Extract the number contained in the string. No space characters or other extra characters allowed. Supported types: | |
| file | common_headers.hpp |
| Common HTTP header names. | |
| file | url.hpp |
| URL manipulation functions. | |
| file | demangle.hpp |
| Returns a human-readable representation of provided type name. | |
| file | algorithm.hpp |
| Miscellaneous cryptographic routines. | |
| file | signers.hpp |
| Digital signature generators. | |
| file | verifiers.hpp |
| Digital signature verifiers. | |
| file | decimal64.hpp |
| Decimal data type for fixed-point arithmetic. | |
| file | format_options.hpp |
| Structure storing format options for decimal. | |
| file | items.hpp |
| Wrapper for handy python-like iteration over a map. | |
| file | merge.hpp |
Add to original new non-object elements from patch (overwriting the old ones, if any) and merge object elements recursively. | |
| file | type.hpp |
| Common enum of types. | |
| file | utils.hpp |
formats::common::GetAtPath and formats::common::RemoveAtPath utils for Value and ValueBuilder | |
| file | json.hpp |
| Include-all header for JSON support. | |
| file | exception.hpp |
| Exception classes for JSON module. | |
| file | inline.hpp |
| Inline value builders. | |
| file | serialize_boost_variant.hpp |
| Serializers for boost::variant types. | |
| file | serialize_duration.hpp |
| Serializers for std::chrono::duration types. | |
| file | serialize_variant.hpp |
| Serializers for std::variant. Deprecated include, use userver/formats/serialize/variant.hpp instead of. | |
| file | boost_optional.hpp |
| Parsers and converters for boost::optional. | |
| file | boost_uuid.hpp |
| boost::uuids::uuid parser for any format | |
| file | boost_variant.hpp |
| Ineffective but generic parser for boost::variant type. | |
| file | time_of_day.hpp |
| utils::datetime::TimeOfDay parser for any format | |
| file | variant.hpp |
| Ineffective but generic parser for std::variant type. | |
| file | boost_optional.hpp |
| Serializers for boost::optional. | |
| file | boost_uuid.hpp |
| boost::uuids::uuid serializer to any format | |
| file | time_of_day.hpp |
| utils::datetime::TimeOfDay to any format | |
| file | variant.hpp |
| Serializers for std::variant. | |
| file | write_to_stream.hpp |
| Common WriteToStream functions for SAX serializers. | |
| file | yaml.hpp |
| Include-all header for YAML support. | |
| file | exception.hpp |
| Exception classes for YAML module. | |
| file | open_mode.hpp |
| A set of OpenFlags. | |
| file | read.hpp |
| functions for synchronous (blocking) file read operations | |
| file | write.hpp |
| Functions for synchronous (blocking) file write operations. | |
| file | get_hostname.hpp |
| Returns host name. | |
| file | read_groups.hpp |
| Reads Conductor groups from conductor-hostinfo file. | |
| file | cpu_limit.hpp |
| Information about CPU limits in container. | |
| file | http_request_parse_args.hpp |
| Strict URL arguments parsing. | |
| file | atomic.hpp |
| Helper algorithms to work with atomics. | |
| file | bytes_per_second.hpp |
Data type that represents bytes per second unit. | |
| file | cpp_20_calendar.hpp |
| This file brings date.h into utils::datetime::date namespace, which is std::chrono::operator/ (calendar) in c++20. | |
| file | from_string_saturating.hpp |
| Saturating converters from strings to time points. | |
| file | timepoint_tz.hpp |
| Timepoint with timezone. | |
| file | tskv.hpp |
| Encoders, decoders and helpers for TSKV representations. | |
| file | enumerate.hpp |
| Implementation of python-style enumerate function for range-for loops. | |
| file | get_if.hpp |
| file | make_intrusive_ptr.hpp |
| Factory function for boost::intrusive_ptr, like std::make_unique. | |
| file | optionals.hpp |
| Helper functions for std optionals. | |
| file | fmt.hpp |
| deprecated header, fmt formatters now reside near the types. | |
| file | str_icase.hpp |
| Case insensitive ASCII comparators and hashers. | |
| file | str_icase_containers.hpp |
| Contains utilities for working with containers with utils::StrCaseHash and utils::StrIcaseHash. | |
| file | string_literal.hpp |
Non-empty string view to a compile time known null terminated char array that lives for the lifetime of program, as per [lex.string]; a drop-in replacement for static const std::string kVar = "value" and constexpr std::string_view kVar = "value". | |
| file | string_to_duration.hpp |
| Converts strings like "10s", "5d", "1h" to durations. | |
| file | text_light.hpp |
| Text utilities that do not use locales. | |
| file | thread_name.hpp |
| Functions for thread name manipulation. | |
| file | threads.hpp |
| Functions to work with OS threads. | |
| file | trivial_map_fwd.hpp |
| Forward declarations of utils::TrivialBiMap and utils::TrivialSet types. | |
| file | underlying_value.hpp |
| file | uuid4.hpp |
| Generate a UUIDv4 string. | |
| file | uuid7.hpp |
| Generate a UUIDv7 string. | |
| file | zstring_view.hpp |
Non-empty string view type that guarantees null-termination and has a c_str() member function. | |
| file | fwd.hpp |
| Forward declarations of YamlConfig type and formats::parse::To. | |
| file | default_logger_fixture.hpp |
| Fixture that allows to set the default logger and manages its lifetime. | |
| file | log_capture_fixture.hpp |
| Fixture that allows to capture and extract log written into the default logger. | |
| file | parameter_names.hpp |
| Test name printer for parameterized tests written in gtest. | |
| file | serialize_duration.hpp |
| Serializers for std::chrono::duration types. | |
Classes | |
| class | utils::datetime::Date |
| Date in format YYYY-MM-DD, std::chrono::year_month_day like type. More... | |
| class | utils::InvariantError |
| Exception that is thrown on UINVARIANT violation. More... | |
| class | utils::datetime::TimeOfDay< Duration > |
| A simple implementation of a "time since midnight" datatype. More... | |
| class | formats::json::ValueBuilder |
| Builder for JSON. More... | |
| struct | formats::parse::To< T > |
| struct | formats::serialize::To< T > |
| class | utils::TracefulException |
| Exception that remembers the backtrace at the point of its construction. More... | |
| class | utils::FastPimpl< T, Size, Alignment, Strict > |
| Implements pimpl idiom without dynamic memory allocation. More... | |
| class | cache::LruMap< T, U, Hash, Equal > |
| class | cache::LruSet< T, Hash, Equal > |
| class | crypto::Certificate |
| class | crypto::PrivateKey |
| class | crypto::PublicKey |
| class | crypto::SslCtx |
| class | decimal64::Decimal< Prec, TRoundPolicy > |
| Fixed-point decimal data type for use in deterministic calculations, oftentimes involving money. More... | |
| class | formats::common::Path |
| class | formats::json::Array |
| Non-mutable JSON array representation. More... | |
| class | formats::json::Object |
| Non-mutable JSON object representation. More... | |
| class | formats::json::StringBuilder |
| SAX like builder of JSON string. Use with extreme caution and only in performance critical part of your code. More... | |
| class | formats::json::Value |
| Non-mutable JSON value representation. More... | |
| class | formats::yaml::Value |
| Non-mutable YAML value representation. More... | |
| class | formats::yaml::ValueBuilder |
| Builder for YAML. More... | |
| class | fs::blocking::CFile |
A std::FILE* wrapper. More... | |
| class | fs::blocking::FileDescriptor |
| A file descriptor wrapper. More... | |
| class | fs::blocking::TempDirectory |
A unique directory for temporary files. The directory is deleted when the TempDirectory is destroyed. More... | |
| class | fs::blocking::TempFile |
A unique temporary file. The file is deleted when the TempFile object is destroyed. More... | |
| class | http::ContentType |
| Content-Type representation. More... | |
| class | http::headers::HeaderMap |
| Container that maps case-insensitive header name into header value. More... | |
| class | http::headers::PredefinedHeader |
| A struct to represent compile-time known header name. More... | |
| class | utils::AnyMovable |
Replacement for std::any that is not copyable. It allows to store non-copyable and even non-movable types. More... | |
| class | utils::AnyStorage< StorageTag > |
| map-like heterogeneous data storage More... | |
| struct | utils::CachedHash< Key > |
| Holds the key and its hash for faster comparisons and hashing. More... | |
| class | utils::CheckedPtr< T > |
| Utility template for returning a pointer to an object that is owned by someone else; throws std::runtime_error if nullptr is stored. More... | |
| struct | utils::datetime::SteadyCoarseClock |
| Steady clock with up to a few millisecond resolution that is slightly faster than the std::chrono::steady_clock. More... | |
| struct | utils::datetime::WallCoarseClock |
| System clock with up to a few millisecond resolution that is slightly faster than the std::chrono::system_clock. More... | |
| class | utils::DefaultDict< ValueType > |
| Dictionary that for missing keys falls back to a default value stored by key utils::kDefaultDictDefaultName. More... | |
| class | utils::expected< S, E > |
| For holding a value or an error. More... | |
| class | utils::FastScopeGuard< Callback > |
| a helper class to perform actions on scope exit More... | |
| class | utils::FilterBloom< T, Counter, Hash1, Hash2 > |
| Space-efficient probabilistic data structure. More... | |
| class | utils::FixedArray< T > |
| A fixed-size array with the size determined at runtime. More... | |
| class | utils::Flags< Enum > |
| Wrapper to extend enum with flags interface. More... | |
| class | utils::AtomicFlags< Enum > |
| Wrapper to extend enum with atomic flags interface. More... | |
| class | utils::LazyPrvalue< Func > |
| Can be used with various emplace functions to allow in-place constructing a non-movable value using a callable. More... | |
| class | utils::NotNull< T > |
| Restricts a pointer or smart pointer to only hold non-null values. More... | |
| class | utils::OptionalRef< T > |
| Class that behaves as a nullable reference. Main difference from the pointer - value comparison of pointed values. More... | |
| struct | utils::Overloaded< Ts > |
| Utility to define std::variant visitors in a simple way. More... | |
| class | utils::regex |
A drop-in replacement for std::regex without huge includes and with better performance characteristics. More... | |
| class | utils::match_results |
A drop-in replacement for std::match_results without huge includes and with better performance characteristics. Represents capturing groups of a single match result. More... | |
| class | utils::ResultStore< T > |
| class | utils::ResultStore< void > |
| class | utils::ScopeGuard |
| a helper class to perform actions on scope exit More... | |
| class | utils::SharedReadablePtr< T > |
std::shared_ptr<const T> wrapper that makes sure that the pointer is stored before dereferencing. Protects from dangling references. More... | |
| class | utils::SlidingInterval< T > |
Sliding interval of values that provides functions to compute average, min and max values from the last window_size values of interval. More... | |
| class | utils::SmallString< N > |
| An alternative to std::string with a custom SSO (small string optimization) container size. Unlike std::string, SmallString is not null-terminated thus it has no c_str(), data() returns a not null-terminated buffer. More... | |
| class | utils::statistics::Histogram |
| A histogram with a dynamically-allocated array of buckets. More... | |
| class | utils::statistics::HistogramView |
| The non-owning reader API for "histogram" metrics. More... | |
| class | utils::statistics::LabelView |
| Non owning label name+value storage. More... | |
| class | utils::statistics::Label |
| Label name+value storage. More... | |
| class | utils::statistics::LabelsSpan |
| View over a continuous range of LabelView. More... | |
| class | utils::statistics::MetricValue |
| The value of a metric. More... | |
| struct | utils::statistics::Rate |
Rate metrics (or "counter" metrics) are metrics that only monotonically increase or are reset to zero on restart. Some monitoring systems give them special treatment with regard to maintaining proper non-negative derivative. More... | |
| class | utils::statistics::RateCounter |
| Atomic counter of type Rate with relaxed memory ordering. More... | |
| class | utils::statistics::Request |
| Class describing the request for metrics data. More... | |
| class | utils::statistics::Writer |
| Class for writing metrics that is provided by utils::statistics::Storage. More... | |
| class | utils::StrongTypedef< Tag, T, Ops, class > |
| Strong typedef for a type T. More... | |
| class | utils::TokenBucket |
| class | utils::TrivialBiMap< BuilderFunc > |
| Bidirectional unordered map for trivial types, including string literals; could be efficiently used as a unordered non-bidirectional map. More... | |
| class | utils::TrivialSet< BuilderFunc > |
| Unordered set for trivial types, including string literals. More... | |
| struct | yaml_config::Schema |
| JSON Schema-like type definition. More... | |
| class | yaml_config::YamlConfig |
| Datatype that represents YAML with substituted variables. More... | |
Macros | |
| #define | USERVER_FILEPATH |
| Short utils::zstring_view with source path for logging. | |
Typedefs | |
| template<typename... T> | |
| using | utils::void_t = std::void_t<T...> |
| std::void_t implementation with workarounds for compiler bugs | |
| template<typename U> | |
| using | utils::SharedRef = NotNull<std::shared_ptr<U>> |
A std::shared_ptr that is guaranteed to be not-null. | |
| template<typename U> | |
| using | utils::UniqueRef = NotNull<std::unique_ptr<U>> |
A std::unique_ptr that is guaranteed to be not-null. | |
| template<typename Value, auto Projection, typename Hash = void, typename Equal = std::equal_to<>, typename Allocator = std::allocator<Value>> | |
| using | utils::ProjectedUnorderedSet |
A std::unordered_set that compares its elements (of type Value) based on their Projection. It allows to create, essentially, an equivalent of std::unordered_map where keys are stored inside values. | |
| template<typename Value, auto Projection, typename Compare = std::less<>, typename Allocator = std::allocator<Value>> | |
| using | utils::ProjectedSet = std::set<Value, impl::projected_set::Compare<Value, Projection, Compare>, Allocator> |
Same as utils::ProjectedUnorderedSet, but for std::set. | |
Enumerations | |
| enum class | utils::BytesPerSecond : long long |
Data type that represents bytes per second unit. More... | |
| #define USERVER_FILEPATH |
Short utils::zstring_view with source path for logging.
Definition at line 21 of file log_filepath.hpp.
| using utils::ProjectedSet = std::set<Value, impl::projected_set::Compare<Value, Projection, Compare>, Allocator> |
Same as utils::ProjectedUnorderedSet, but for std::set.
Definition at line 106 of file projected_set.hpp.
| using utils::ProjectedUnorderedSet |
A std::unordered_set that compares its elements (of type Value) based on their Projection. It allows to create, essentially, an equivalent of std::unordered_map where keys are stored inside values.
Usage example:
Definition at line 97 of file projected_set.hpp.
| using utils::SharedRef = NotNull<std::shared_ptr<U>> |
A std::shared_ptr that is guaranteed to be not-null.
Definition at line 113 of file not_null.hpp.
| using utils::UniqueRef = NotNull<std::unique_ptr<U>> |
A std::unique_ptr that is guaranteed to be not-null.
Definition at line 120 of file not_null.hpp.
| using utils::void_t = std::void_t<T...> |
std::void_t implementation with workarounds for compiler bugs
Definition at line 17 of file void_t.hpp.
|
strong |
Data type that represents bytes per second unit.
Definition at line 18 of file bytes_per_second.hpp.