![]() |
MySQL 9.3.0
Source Code Documentation
|
codec for variable length integers. More...
#include <classic_protocol_codec_wire.h>
Public Types | |
using | value_type = borrowable::wire::VarInt |
using | __base = impl::EncodeBase< Codec< value_type > > |
Public Member Functions | |
constexpr | Codec (value_type v, capabilities::value_type caps) |
![]() | |
constexpr | EncodeBase (capabilities::value_type caps) |
constexpr size_t | size () const noexcept |
stdx::expected< size_t, std::error_code > | encode (net::mutable_buffer buffer) const |
constexpr capabilities::value_type | caps () const noexcept |
Static Public Member Functions | |
static constexpr size_t | max_size () noexcept |
static stdx::expected< std::pair< size_t, value_type >, std::error_code > | decode (const net::const_buffer &buffer, capabilities::value_type caps) |
Public Attributes | |
friend | __base |
Static Public Attributes | |
static constexpr uint8_t | varint_16 {0xfc} |
static constexpr uint8_t | varint_24 {0xfd} |
static constexpr uint8_t | varint_64 {0xfe} |
Private Member Functions | |
template<class Accumulator > | |
constexpr auto | accumulate_fields (Accumulator &&accu) const |
Private Attributes | |
const value_type | v_ |
codec for variable length integers.
note: encoded as little endian
0x00 ... 0xfa -> 0xfa 0xfb [undefined] 0xfc 0x.. 0x.. 0xfd 0x.. 0x.. 0x.. 3.21: 0xfe 0x.. 0x.. 0x.. 0x.. 0x00 [1 + 5 bytes read, only 4 bytes used] 4.0: 0xfe 0x.. 0x.. 0x.. 0x.. 0x.. 0x.. 0x.. 0x.. [1 + 8 bytes read, only 4 bytes used]
using classic_protocol::Codec< borrowable::wire::VarInt >::__base = impl::EncodeBase<Codec<value_type> > |
|
inlineconstexpr |
|
inlineconstexprprivate |
|
inlinestatic |
|
inlinestaticconstexprnoexcept |
|
private |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |