LibQuicR
quicr::messages::KeyValuePair< T > Struct Template Reference

#include <ctrl_message_types.h>

Public Member Functions

std::size_t Size (const T prev_type) const
 
bool operator== (const KeyValuePair< T > &other) const
 

Public Attributes

T type
 Absolute key type. More...
 
Bytes value
 Opaque odd-key bytes or host-order integer bytes for an even key. More...
 

Detailed Description

template<KeyType T>
struct quicr::messages::KeyValuePair< T >

MoQ key/value pair.

Keys are delta-encoded relative to the preceding key. Odd keys carry length-prefixed opaque bytes; even keys carry a UintVar represented in value using host-memory byte order and up to eight bytes.

Template Parameters
TKey type satisfying KeyType.

Member Function Documentation

◆ operator==()

template<KeyType T>
bool quicr::messages::KeyValuePair< T >::operator== ( const KeyValuePair< T > &  other) const
inline

Equality comparison operator for KeyValuePair.

Parameters
otherThe KeyValuePair to compare with.
Returns
True if both KeyValuePair objects are equal, false otherwise.
Exceptions
std::invalid_argumentif either even-key value exceeds eight bytes.

◆ Size()

template<KeyType T>
std::size_t quicr::messages::KeyValuePair< T >::Size ( const T  prev_type) const
inline

Get the encoded size of this KeyValuePair, in bytes.

Parameters
prev_typeThe previous type value.
Returns
Encoded size, in bytes.
Exceptions
std::invalid_argumentif an even-key value exceeds eight bytes.

Member Data Documentation

◆ type

template<KeyType T>
T quicr::messages::KeyValuePair< T >::type

Absolute key type.

◆ value

template<KeyType T>
Bytes quicr::messages::KeyValuePair< T >::value

Opaque odd-key bytes or host-order integer bytes for an even key.


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