userver: http::headers::PredefinedHeader Class Reference
Loading...
Searching...
No Matches
http::headers::PredefinedHeader Class Referencefinal

#include <userver/http/predefined_header.hpp>

Detailed Description

A struct to represent compile-time known header name.

Calculates the hash value at compile time with the same hasher HeaderMap uses, which allows to speed things up greatly.

Although it's possible to construct PredefinedHeader at runtime it makes little sense and is error-prone, since it doesn't own its data, so don't do that until really needed.

Definition at line 168 of file predefined_header.hpp.

Public Member Functions

constexpr PredefinedHeader (utils::StringLiteral name)
 
constexpr operator utils::StringLiteral () const
 
constexpr operator utils::zstring_view () const
 
constexpr operator std::string_view () const
 
 operator std::string () const
 

Constructor & Destructor Documentation

◆ PredefinedHeader()

constexpr http::headers::PredefinedHeader::PredefinedHeader ( utils::StringLiteral  name)
inlineexplicitconstexpr

Definition at line 170 of file predefined_header.hpp.

Member Function Documentation

◆ operator std::string()

http::headers::PredefinedHeader::operator std::string ( ) const
inlineexplicit

Definition at line 179 of file predefined_header.hpp.

◆ operator std::string_view()

constexpr http::headers::PredefinedHeader::operator std::string_view ( ) const
inlineconstexpr

Definition at line 177 of file predefined_header.hpp.

◆ operator utils::StringLiteral()

constexpr http::headers::PredefinedHeader::operator utils::StringLiteral ( ) const
inlineconstexpr

Definition at line 173 of file predefined_header.hpp.

◆ operator utils::zstring_view()

constexpr http::headers::PredefinedHeader::operator utils::zstring_view ( ) const
inlineconstexpr

Definition at line 175 of file predefined_header.hpp.

Friends And Related Symbol Documentation

◆ header_map::Danger

friend class header_map::Danger
friend

Definition at line 182 of file predefined_header.hpp.

◆ header_map::Map

friend class header_map::Map
friend

Definition at line 183 of file predefined_header.hpp.


The documentation for this class was generated from the following file: