userver: baggage::BaggageEntry Class Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
baggage::BaggageEntry Class Reference

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

#include <userver/baggage/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.
 

Friends

class Baggage
 

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.

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: