RESTinio
|
Information about one chunk in an incoming request with chunked encoding. More...
#include <chunked_input_info.hpp>
Public Member Functions | |
chunk_info_t (std::size_t started_at, std::size_t size) | |
Initializing constructor. More... | |
RESTINIO_NODISCARD std::size_t | started_at () const noexcept |
Get the starting offset of chunk. More... | |
RESTINIO_NODISCARD std::size_t | size () const noexcept |
Get the size of chunk. More... | |
RESTINIO_NODISCARD string_view_t | make_string_view_nonchecked (string_view_t full_body) const noexcept |
Extract the chunk value from the whole body. More... | |
RESTINIO_NODISCARD string_view_t | make_string_view (string_view_t full_body) const |
Extract the chunk value from the whole body. More... | |
Private Attributes | |
std::size_t | m_started_at |
std::size_t | m_size |
Information about one chunk in an incoming request with chunked encoding.
In RESTinio v.0.6.9 all chunks are concatenated into the one body. The information about individual chunks preserved in the form of vector of chunk_info_t objects. Every object contains the offset from the begining of the concatenated body and the size of the chunk. This information allows to extract the corresponding fragment from the whole body.
Definition at line 40 of file chunked_input_info.hpp.
|
inline |
Initializing constructor.
Definition at line 47 of file chunked_input_info.hpp.
|
inline |
Extract the chunk value from the whole body.
A check of possibility of extraction is performed.
exception_t | if full_body is too small to hold the chunk. |
Definition at line 86 of file chunked_input_info.hpp.
|
inlinenoexcept |
Extract the chunk value from the whole body.
Definition at line 73 of file chunked_input_info.hpp.
|
inlinenoexcept |
Get the size of chunk.
Definition at line 62 of file chunked_input_info.hpp.
|
inlinenoexcept |
Get the starting offset of chunk.
Definition at line 57 of file chunked_input_info.hpp.
|
private |
Definition at line 43 of file chunked_input_info.hpp.
|
private |
Definition at line 42 of file chunked_input_info.hpp.