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 171 of file predefined_header.hpp.

Public Member Functions

constexpr PredefinedHeader (std::string_view name)
 
constexpr operator std::string_view () const
 
 operator std::string () const
 

Constructor & Destructor Documentation

◆ PredefinedHeader()

constexpr http::headers::PredefinedHeader::PredefinedHeader ( std::string_view name)
inlineexplicitconstexpr

Definition at line 173 of file predefined_header.hpp.

Member Function Documentation

◆ operator std::string()

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

Definition at line 180 of file predefined_header.hpp.

◆ operator std::string_view()

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

Definition at line 178 of file predefined_header.hpp.

Friends And Related Symbol Documentation

◆ header_map::Danger

friend class header_map::Danger
friend

Definition at line 183 of file predefined_header.hpp.

◆ header_map::Map

friend class header_map::Map
friend

Definition at line 184 of file predefined_header.hpp.


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