MySQL 8.0.39
Source Code Documentation
buffer.h File Reference
#include <algorithm>
#include <array>
#include <limits>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>
#include <type_traits>
#include <utility>
#include <vector>
#include "mysql/harness/net_ts/executor.h"
#include "mysql/harness/net_ts/impl/socket_constants.h"
#include "mysql/harness/stdx/expected.h"
#include "mysql/harness/stdx/span.h"

Go to the source code of this file.

Classes

struct  std::is_error_code_enum< net::stream_errc >
 
class  net::mutable_buffer
 
class  net::const_buffer
 
struct  net::impl::is_buffer_sequence< T, BufferType, class >
 
struct  net::impl::is_buffer_sequence< T, BufferType, std::void_t< buffer_sequence_requirements< T, BufferType > > >
 
struct  net::impl::is_const_buffer_sequence< T >
 
struct  net::impl::is_mutable_buffer_sequence< T >
 
struct  net::is_mutable_buffer_sequence< T >
 
struct  net::is_const_buffer_sequence< T >
 
struct  net::impl::is_dynamic_buffer< T, class >
 
struct  net::impl::is_dynamic_buffer< T, decltype(dynamic_buffer_requirements< T >())>
 
struct  net::is_dynamic_buffer< T >
 
class  net::impl::dynamic_buffer_base< T >
 
class  net::dynamic_vector_buffer< T, Allocator >
 
class  net::dynamic_string_buffer< CharT, Traits, Allocator >
 
class  net::transfer_all
 
class  net::transfer_at_least
 
class  net::transfer_exactly
 
class  net::prepared_buffers< BufferType >
 
class  net::consuming_buffers< BufferSequence, BufferType >
 

Namespaces

namespace  net
 
namespace  std
 
namespace  net::impl
 

Typedefs

template<class T , class BufferType , class Begin = decltype(net::buffer_sequence_begin( std::declval<typename std::add_lvalue_reference<T>::type>())), class End = decltype(net::buffer_sequence_end( std::declval<typename std::add_lvalue_reference<T>::type>()))>
using net::impl::buffer_sequence_requirements = std::integral_constant< bool, std::conjunction< std::is_same< Begin, End >, std::is_convertible< typename std::iterator_traits< Begin >::value_type, BufferType > >::value >
 

Enumerations

enum class  net::stream_errc { net::eof = 1 , net::not_found }
 

Functions

const std::error_category & net::stream_category () noexcept
 
std::error_code net::make_error_code (net::stream_errc e) noexcept
 
std::error_condition net::make_error_condition (net::stream_errc e) noexcept
 
const const_buffer * net::buffer_sequence_begin (const const_buffer &b) noexcept
 
const const_buffer * net::buffer_sequence_end (const const_buffer &b) noexcept
 
template<class C >
auto net::buffer_sequence_begin (C &c) noexcept -> decltype(c.begin())
 
template<class C >
auto net::buffer_sequence_begin (const C &c) noexcept -> decltype(c.begin())
 
template<class C >
auto net::buffer_sequence_end (C &c) noexcept -> decltype(c.end())
 
template<class C >
auto net::buffer_sequence_end (const C &c) noexcept -> decltype(c.end())
 
const mutable_buffer * net::buffer_sequence_begin (const mutable_buffer &b) noexcept
 
const mutable_buffer * net::buffer_sequence_end (const mutable_buffer &b) noexcept
 
template<class T , class U = std::remove_const_t<T>>
auto net::impl::dynamic_buffer_requirements (U *__x=nullptr, const U *__const_x=nullptr, size_t __n=0) -> std::enable_if_t< std::conjunction< std::is_copy_constructible< U >, is_const_buffer_sequence< typename T::const_buffers_type >, is_mutable_buffer_sequence< typename T::mutable_buffers_type >, std::is_same< decltype(__const_x->size()), size_t >, std::is_same< decltype(__const_x->max_size()), size_t >, std::is_same< decltype(__const_x->capacity()), size_t >, std::is_same< decltype(__const_x->data(__n, __n)), typename T::const_buffers_type >, std::is_same< decltype(__x->data(__n, __n)), typename T::mutable_buffers_type >, std::is_void< decltype(__x->grow(__n))>, std::is_void< decltype(__x->shrink(__n))>, std::is_void< decltype(__x->consume(__n))> >::value >
 
template<class ConstBufferSequence >
size_t net::buffer_size (const ConstBufferSequence &buffers) noexcept
 
template<>
size_t net::buffer_size< const_buffer > (const const_buffer &b) noexcept
 
template<>
size_t net::buffer_size< mutable_buffer > (const mutable_buffer &b) noexcept
 
template<class MutableBufferSequence , class ConstBufferSequence >
size_t net::buffer_copy (const MutableBufferSequence &dest, const ConstBufferSequence &src, const size_t max_size) noexcept
 copy bytes from a ConstBufferSequence to a MutableBufferSequence. More...
 
template<class MutableBufferSequence , class ConstBufferSequence >
size_t net::buffer_copy (const MutableBufferSequence &dest, const ConstBufferSequence &src) noexcept
 
mutable_buffer net::operator+ (const mutable_buffer &b, size_t n) noexcept
 
mutable_buffer net::operator+ (size_t n, const mutable_buffer &b) noexcept
 
const_buffer net::operator+ (const const_buffer &b, size_t n) noexcept
 
const_buffer net::operator+ (size_t n, const const_buffer &b) noexcept
 
mutable_buffer net::buffer (void *p, size_t n) noexcept
 
const_buffer net::buffer (const void *p, size_t n) noexcept
 
mutable_buffer net::buffer (const mutable_buffer &b) noexcept
 
mutable_buffer net::buffer (const mutable_buffer &b, size_t n) noexcept
 
const_buffer net::buffer (const const_buffer &b) noexcept
 
const_buffer net::buffer (const const_buffer &b, size_t n) noexcept
 
template<typename T >
mutable_buffer net::impl::to_mutable_buffer (T *data, size_t n)
 
template<typename T >
const_buffer net::impl::to_const_buffer (const T *data, size_t n)
 
template<class T , size_t N>
mutable_buffer net::buffer (T(&data)[N]) noexcept
 
template<class T , size_t N>
const_buffer net::buffer (const T(&data)[N]) noexcept
 
template<class T , size_t N>
mutable_buffer net::buffer (std::array< T, N > &data) noexcept
 
template<class T , size_t N>
const_buffer net::buffer (std::array< const T, N > &data) noexcept
 
template<class T , class Allocator >
mutable_buffer net::buffer (std::vector< T, Allocator > &data) noexcept
 
template<class T , class Allocator >
const_buffer net::buffer (const std::vector< T, Allocator > &data) noexcept
 
template<class CharT , class Traits , class Allocator >
mutable_buffer net::buffer (std::basic_string< CharT, Traits, Allocator > &data) noexcept
 
template<class CharT , class Traits , class Allocator >
const_buffer net::buffer (const std::basic_string< CharT, Traits, Allocator > &data) noexcept
 
template<class CharT , class Traits >
const_buffer net::buffer (const std::basic_string_view< CharT, Traits > &data) noexcept
 
template<class T , std::size_t E>
const_buffer net::buffer (const stdx::span< T, E > &data) noexcept
 
template<class T , size_t N>
mutable_buffer net::buffer (T(&data)[N], size_t n) noexcept
 
template<class T , size_t N>
const_buffer net::buffer (const T(&data)[N], size_t n) noexcept
 
template<class T , size_t N>
mutable_buffer net::buffer (std::array< T, N > &data, size_t n) noexcept
 
template<class T , size_t N>
const_buffer net::buffer (std::array< const T, N > &data, size_t n) noexcept
 
template<class T , class Allocator >
mutable_buffer net::buffer (std::vector< T, Allocator > &data, size_t n) noexcept
 
template<class T , class Allocator >
const_buffer net::buffer (const std::vector< T, Allocator > &data, size_t n) noexcept
 
template<class CharT , class Traits , class Allocator >
mutable_buffer net::buffer (std::basic_string< CharT, Traits, Allocator > &data, size_t n) noexcept
 
template<class CharT , class Traits , class Allocator >
const_buffer net::buffer (const std::basic_string< CharT, Traits, Allocator > &data, size_t n) noexcept
 
template<class T , std::size_t E>
const_buffer net::buffer (const stdx::span< T, E > &data, size_t n) noexcept
 
template<class T , class Allocator >
dynamic_vector_buffer< T, Allocator > net::dynamic_buffer (std::vector< T, Allocator > &vec) noexcept
 
template<class T , class Allocator >
dynamic_vector_buffer< T, Allocator > net::dynamic_buffer (std::vector< T, Allocator > &vec, size_t n) noexcept
 
template<class CharT , class Traits , class Allocator >
dynamic_string_buffer< CharT, Traits, Allocator > net::dynamic_buffer (std::basic_string< CharT, Traits, Allocator > &str) noexcept
 
template<class CharT , class Traits , class Allocator >
dynamic_string_buffer< CharT, Traits, Allocator > net::dynamic_buffer (std::basic_string< CharT, Traits, Allocator > &str, size_t n) noexcept
 
template<class SyncReadStream , class MutableBufferSequence >
std::enable_if_t< is_mutable_buffer_sequence< MutableBufferSequence >::value, stdx::expected< size_t, std::error_code > > net::read (SyncReadStream &stream, const MutableBufferSequence &buffers)
 
template<class SyncReadStream , class MutableBufferSequence , class CompletionCondition >
std::enable_if_t< is_mutable_buffer_sequence< MutableBufferSequence >::value, stdx::expected< size_t, std::error_code > > net::read (SyncReadStream &stream, const MutableBufferSequence &buffers, CompletionCondition cond)
 
template<class SyncReadStream , class DynamicBuffer >
std::enable_if_t< is_dynamic_buffer< std::decay_t< DynamicBuffer > >::value, stdx::expected< size_t, std::error_code > > net::read (SyncReadStream &stream, DynamicBuffer &&b)
 
template<class SyncReadStream , class DynamicBuffer , class CompletionCondition >
std::enable_if_t< is_dynamic_buffer< std::decay_t< DynamicBuffer > >::value, stdx::expected< size_t, std::error_code > > net::read (SyncReadStream &stream, DynamicBuffer &&b, CompletionCondition cond)
 
template<class AsyncReadStream , class DynamicBuffer , class CompletionCondition , class CompletionToken >
std::enable_if_t< is_dynamic_buffer< DynamicBuffer >::value, void > net::async_read (AsyncReadStream &stream, DynamicBuffer &&b, CompletionCondition completion_condition, CompletionToken &&token)
 
template<class AsyncReadStream , class DynamicBuffer , class CompletionToken >
std::enable_if_t< is_dynamic_buffer< DynamicBuffer >::value, void > net::async_read (AsyncReadStream &stream, DynamicBuffer &&b, CompletionToken &&token)
 
template<class SyncWriteStream , class ConstBufferSequence >
std::enable_if_t< is_const_buffer_sequence< ConstBufferSequence >::value, stdx::expected< size_t, std::error_code > > net::write (SyncWriteStream &stream, const ConstBufferSequence &buffers)
 
template<class SyncWriteStream , class ConstBufferSequence , class CompletionCondition >
std::enable_if_t< is_const_buffer_sequence< ConstBufferSequence >::value, stdx::expected< size_t, std::error_code > > net::write (SyncWriteStream &stream, const ConstBufferSequence &buffers, CompletionCondition cond)
 
template<class SyncWriteStream , class DynamicBuffer >
std::enable_if_t< is_dynamic_buffer< DynamicBuffer >::value, stdx::expected< size_t, std::error_code > > net::write (SyncWriteStream &stream, DynamicBuffer &&b)
 
template<class SyncWriteStream , class DynamicBuffer , class CompletionCondition >
std::enable_if_t< is_dynamic_buffer< DynamicBuffer >::value, stdx::expected< size_t, std::error_code > > net::write (SyncWriteStream &stream, DynamicBuffer &&b, CompletionCondition cond)
 
template<class AsyncWriteStream , class DynamicBuffer , class CompletionCondition , class CompletionToken >
std::enable_if_t< is_dynamic_buffer< DynamicBuffer >::value, void > net::async_write (AsyncWriteStream &stream, DynamicBuffer &&b, CompletionCondition cond, CompletionToken &&token)
 
template<class AsyncWriteStream , class DynamicBuffer , class CompletionToken >
std::enable_if_t< is_dynamic_buffer< DynamicBuffer >::value, void > net::async_write (AsyncWriteStream &stream, DynamicBuffer &&b, CompletionToken &&token)
 

Variables

template<class T >
constexpr bool net::is_const_buffer_sequence_v = is_const_buffer_sequence<T>::value
 
template<class T >
constexpr bool net::is_mutable_buffer_sequence_v
 
template<class T >
constexpr bool net::is_dynamic_buffer_v = is_dynamic_buffer<T>::value