ゴミ箱
|
#include <buffer_prefix.hpp>
Classes | |
class | const_iterator |
Public Types | |
using | value_type = typename std::conditional< std::is_convertible< typename std::iterator_traits< iter_type >::value_type, boost::asio::mutable_buffer >::value, boost::asio::mutable_buffer, boost::asio::const_buffer >::type |
The type for each element in the list of buffers. More... | |
Public Member Functions | |
buffer_prefix_view (buffer_prefix_view &&) | |
Move constructor. More... | |
buffer_prefix_view (buffer_prefix_view const &) | |
Copy constructor. More... | |
buffer_prefix_view & | operator= (buffer_prefix_view &&) |
Move assignment. More... | |
buffer_prefix_view & | operator= (buffer_prefix_view const &) |
Copy assignment. More... | |
buffer_prefix_view (std::size_t size, BufferSequence const &buffers) | |
template<class... Args> | |
buffer_prefix_view (std::size_t size, boost::in_place_init_t, Args &&...args) | |
const_iterator | begin () const |
Get a bidirectional iterator to the first element. More... | |
const_iterator | end () const |
Get a bidirectional iterator to one past the last element. More... | |
A buffer sequence adapter that shortens the sequence size.
The class adapts a buffer sequence to efficiently represent a shorter subset of the original list of buffers starting with the first byte of the original sequence.
BufferSequence | The buffer sequence to adapt. |
using boost::beast::buffer_prefix_view< BufferSequence >::value_type = typename std::conditional< std::is_convertible<typename std::iterator_traits<iter_type>::value_type, boost::asio::mutable_buffer>::value, boost::asio::mutable_buffer, boost::asio::const_buffer>::type |
The type for each element in the list of buffers.
boost::beast::buffer_prefix_view< BufferSequence >::buffer_prefix_view | ( | buffer_prefix_view< BufferSequence > && | other | ) |
Move constructor.
boost::beast::buffer_prefix_view< BufferSequence >::buffer_prefix_view | ( | buffer_prefix_view< BufferSequence > const & | other | ) |
Copy constructor.
boost::beast::buffer_prefix_view< BufferSequence >::buffer_prefix_view | ( | std::size_t | size, |
BufferSequence const & | buffers | ||
) |
Construct a buffer sequence prefix.
size | The maximum number of bytes in the prefix. If this is larger than the size of passed, buffers, the resulting sequence will represent the entire input sequence. |
buffers | The buffer sequence to adapt. A copy of the sequence will be made, but ownership of the underlying memory is not transferred. |
boost::beast::buffer_prefix_view< BufferSequence >::buffer_prefix_view | ( | std::size_t | size, |
boost::in_place_init_t | , | ||
Args &&... | args | ||
) |
Construct a buffer sequence prefix in-place.
size | The maximum number of bytes in the prefix. If this is larger than the size of passed, buffers, the resulting sequence will represent the entire input sequence. |
args | Arguments forwarded to the contained buffers constructor. |
|
inline |
Get a bidirectional iterator to the first element.
|
inline |
Get a bidirectional iterator to one past the last element.
auto boost::beast::buffer_prefix_view< BufferSequence >::operator= | ( | buffer_prefix_view< BufferSequence > && | other | ) |
Move assignment.
auto boost::beast::buffer_prefix_view< BufferSequence >::operator= | ( | buffer_prefix_view< BufferSequence > const & | other | ) |
Copy assignment.