Loading...
Searching...
No Matches
restinio::easy_parser::impl::producer_tag< Result_Type > Struct Template Reference

A special base class to be used with producers. More...

`#include <easy_parser.hpp>`

## Public Types

using | result_type = Result_Type

## Static Public Attributes

static constexpr entity_type_t | entity_type = entity_type_t::producer

## Detailed Description

template<typename Result_Type>
struct restinio::easy_parser::impl::producer_tag< Result_Type >

A special base class to be used with producers.

Every producer class should have the following content:

class some_producer_type
{
public:
using result_type = ... // some producer-specific type.
static constexpr entity_type_t entity_type = entity_type_t::producer;
expected_t<result_type, parse_error_t>
try_parse(source_t & from);
...
};
restinio::easy_parser::impl::source_t
The class that implements "input stream".
Definition: easy_parser.hpp:740
restinio::easy_parser::impl::entity_type_t
entity_type_t
A marker for distinguish different kind of entities in parser.
Definition: easy_parser.hpp:901
restinio::easy_parser::try_parse
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.
Definition: easy_parser.hpp:5042
restinio::expected_t
nonstd::expected< T, E > expected_t
Definition: expected.hpp:22
restinio::easy_parser::impl::producer_tag::result_type
Result_Type result_type
Definition: easy_parser.hpp:946

Since
  v.0.6.1

Definition at line 944 of file easy_parser.hpp.

## Member Typedef Documentation

## result_type

template<typename Result_Type >

using restinio::easy_parser::impl::producer_tag< Result_Type >::result_type = Result_Type

Definition at line 946 of file easy_parser.hpp.

## Member Data Documentation

## entity_type

template<typename Result_Type >

constexpr entity_type_t restinio::easy_parser::impl::producer_tag< Result_Type >::entity_type = entity_type_t::producer

static constexpr

Definition at line 947 of file easy_parser.hpp.

The documentation for this struct was generated from the following file:

- restinio/helpers/easy_parser.hpp