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

A struct to represent compile-time known header name. More...

#include <userver/http/predefined_header.hpp>

Public Member Functions

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

Friends

class header_map::Danger
 
class header_map::Map
 

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

Constructor & Destructor Documentation

◆ PredefinedHeader()

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

Definition at line 161 of file predefined_header.hpp.

Member Function Documentation

◆ operator std::string()

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

Definition at line 168 of file predefined_header.hpp.

◆ operator std::string_view()

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

Definition at line 166 of file predefined_header.hpp.

Friends And Related Symbol Documentation

◆ header_map::Danger

friend class header_map::Danger
friend

Definition at line 171 of file predefined_header.hpp.

◆ header_map::Map

friend class header_map::Map
friend

Definition at line 172 of file predefined_header.hpp.


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