userver: baggage::BaggageEntry Class Reference
Loading...
Searching...
No Matches
baggage::BaggageEntry Class Reference

#include <userver/baggage/baggage.hpp>

Detailed Description

Baggage Entry. Has required key and value, optional list of properties. Keys shouldn't contain '=' and ','. Values shouldn't contains ',' and ';'.

Definition at line 55 of file baggage.hpp.

Public Member Functions

 BaggageEntry (std::string_view key, std::string_view value, std::vector< BaggageEntryProperty > properties)
 
std::string ToString () const
 
std::string GetValue () const
 
std::string GetKey () const
 
const std::vector< BaggageEntryProperty > & GetProperties () const
 
bool HasProperty (const std::string &key) const
 Check that entry contains property with selected key.
 
const BaggageEntryPropertyGetProperty (const std::string &key) const
 Get first property with selected key.
 

Member Function Documentation

◆ GetProperties()

const std::vector< BaggageEntryProperty > & baggage::BaggageEntry::GetProperties ( ) const
Returns
vector of properties of chosen entry

◆ GetProperty()

const BaggageEntryProperty & baggage::BaggageEntry::GetProperty ( const std::string & key) const

Get first property with selected key.

Exceptions
BaggageExceptionIf key doesn't exist

Friends And Related Symbol Documentation

◆ Baggage

friend class Baggage
friend

Definition at line 56 of file baggage.hpp.


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