A helper class to automatically return acquired content back to the input stream.
More...
#include <easy_parser.hpp>
A helper class to automatically return acquired content back to the input stream.
Usage example:
source_t::content_consumer_t
consumer{from};
for(auto ch = from.getch(); some_condition(ch); ch = from.getch())
{
...
}
if(no_errors_detected())
...
}
source_t(string_view_t data) noexcept
Initializing constructor.
@ consumer
Entity is a consumer of values. It requires a value on the input and doesn't produces anything.
RESTINIO_NODISCARD expected_t< typename Producer::result_type, parse_error_t > try_parse(string_view_t from, Producer producer)
Perform the parsing of the specified content by using specified value producer.
- Since
- v.0.6.1
Definition at line 850 of file easy_parser.hpp.
◆ content_consumer_t() [1/4]
restinio::easy_parser::impl::source_t::content_consumer_t::content_consumer_t |
( |
| ) |
|
|
delete |
◆ content_consumer_t() [2/4]
◆ content_consumer_t() [3/4]
restinio::easy_parser::impl::source_t::content_consumer_t::content_consumer_t |
( |
content_consumer_t && |
| ) |
|
|
delete |
◆ content_consumer_t() [4/4]
restinio::easy_parser::impl::source_t::content_consumer_t::content_consumer_t |
( |
source_t & |
from | ) |
|
|
inlinenoexcept |
◆ ~content_consumer_t()
restinio::easy_parser::impl::source_t::content_consumer_t::~content_consumer_t |
( |
| ) |
|
|
inlinenoexcept |
◆ commit()
void restinio::easy_parser::impl::source_t::content_consumer_t::commit |
( |
| ) |
|
|
inlinenoexcept |
Consume all acquired content.
- Note
- If that method is not called then all acquired content will be returned back.
Definition at line 885 of file easy_parser.hpp.
◆ started_at()
position_t restinio::easy_parser::impl::source_t::content_consumer_t::started_at |
( |
| ) |
const |
|
inlinenoexcept |
◆ m_consumed
bool restinio::easy_parser::impl::source_t::content_consumer_t::m_consumed { false } |
|
private |
◆ m_from
source_t& restinio::easy_parser::impl::source_t::content_consumer_t::m_from |
|
private |
◆ m_started_at
const position_t restinio::easy_parser::impl::source_t::content_consumer_t::m_started_at |
|
private |
The documentation for this class was generated from the following file: