Kagome
Polkadot Runtime Engine in C++17
kagome::network::UVarMessageAdapter< T > Struct Template Reference

#include <uvar.hpp>

Collaboration diagram for kagome::network::UVarMessageAdapter< T >:

Static Public Member Functions

static size_t size (const T &)
 
static std::vector< uint8_t >::iterator write (const T &t, std::vector< uint8_t > &out, std::vector< uint8_t >::iterator loaded)
 
static outcome::result< std::vector< uint8_t >::const_iterator > read (T &, const std::vector< uint8_t > &src, std::vector< uint8_t >::const_iterator from)
 

Static Public Attributes

static constexpr size_t kContinuationBitMask {0x80ull}
 
static constexpr size_t kSignificantBitsMask {0x7Full}
 
static constexpr size_t kMSBBit = (1ull << 63)
 
static constexpr size_t kPayloadSize
 
static constexpr size_t kSignificantBitsMaskMSB {kSignificantBitsMask << 57}
 

Detailed Description

template<typename T>
struct kagome::network::UVarMessageAdapter< T >

Definition at line 21 of file uvar.hpp.

Member Function Documentation

template<typename T >
static outcome::result<std::vector<uint8_t>::const_iterator> kagome::network::UVarMessageAdapter< T >::read ( T &  ,
const std::vector< uint8_t > &  src,
std::vector< uint8_t >::const_iterator  from 
)
inlinestatic

Definition at line 60 of file uvar.hpp.

template<typename T >
static size_t kagome::network::UVarMessageAdapter< T >::size ( const T &  )
inlinestatic

Definition at line 29 of file uvar.hpp.

template<typename T >
static std::vector<uint8_t>::iterator kagome::network::UVarMessageAdapter< T >::write ( const T &  t,
std::vector< uint8_t > &  out,
std::vector< uint8_t >::iterator  loaded 
)
inlinestatic

We need to align bits to 7-bit bound

Definition at line 33 of file uvar.hpp.

Member Data Documentation

template<typename T >
constexpr size_t kagome::network::UVarMessageAdapter< T >::kContinuationBitMask {0x80ull}
static

Definition at line 22 of file uvar.hpp.

template<typename T >
constexpr size_t kagome::network::UVarMessageAdapter< T >::kMSBBit = (1ull << 63)
static

Definition at line 24 of file uvar.hpp.

template<typename T >
constexpr size_t kagome::network::UVarMessageAdapter< T >::kPayloadSize
static
Initial value:
=
((sizeof(uint64_t) << size_t(3)) + size_t(6)) / size_t(7)

Definition at line 25 of file uvar.hpp.

template<typename T >
constexpr size_t kagome::network::UVarMessageAdapter< T >::kSignificantBitsMask {0x7Full}
static

Definition at line 23 of file uvar.hpp.

template<typename T >
constexpr size_t kagome::network::UVarMessageAdapter< T >::kSignificantBitsMaskMSB {kSignificantBitsMask << 57}
static

Definition at line 27 of file uvar.hpp.


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