Beast Logo

PrevUpHomeNext

consuming_buffers

Adapter to trim the front of a BufferSequence.

template<
    class BufferSequence>
class consuming_buffers
Types

Name

Description

const_iterator

A bidirectional iterator type that may be used to read elements.

value_type

The type for each element in the list of buffers.

Member Functions

Name

Description

begin

Get a bidirectional iterator to the first element.

consume

Remove bytes from the beginning of the sequence.

consuming_buffers

Move constructor.

Copy constructor.

Construct to represent a buffer sequence.

end

Get a bidirectional iterator to one past the last element.

operator=

Move assignment.

Copy assignment.

This adapter wraps a buffer sequence to create a new sequence which may be incrementally consumed. Bytes consumed are removed from the front of the buffer. The underlying memory is not changed, instead the adapter efficiently iterates through a subset of the buffers wrapped.

The wrapped buffer is not modified, a copy is made instead. Ownership of the underlying memory is not transferred, the application is still responsible for managing its lifetime.

BufferSequence

The buffer sequence to wrap.

Requirements

Header: beast/core/consuming_buffers.hpp

Convenience header: beast/core.hpp


PrevUpHomeNext