restinio::easy_parser::impl::transformer_invoker< Result_Type > Struct Template Reference

A helper template for calling transformation function. More...

`#include <easy_parser.hpp>`

## Static Public Member Functions

template<typename Transformer , typename Input_Type >
static RESTINIO_NODISCARD Result_Type | invoke (source_t &, Transformer &transformer, expected_t< Input_Type, parse_error_t > &&input)

## Detailed Description

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

A helper template for calling transformation function.

The transformer_invoker class is intended to wrap a call to Transformer::transform method. That method can return a value of type T or a value of type expected_t<T, error_reason_t>.

In the case of return value of type T the returned value of T should be used directly.

In the case of return value of type expected_t<T, error_reason_t> the return value should be checked for the presence of an error. In the case of an error expected_t<T, error_reason_t> should be converted into expected_t<T, parser_error_t>.

Since
  v.0.6.11

Definition at line 1047 of file easy_parser.hpp.

## Member Function Documentation

## invoke()

template<typename Result_Type >
template<typename Transformer , typename Input_Type >

static RESTINIO_NODISCARD Result_Type restinio::easy_parser::impl::transformer_invoker< Result_Type >::invoke | ( | source_t & | ,
|  | Transformer & | transformer,
|  | expected_t< Input_Type, parse_error_t > && | input
| ) |  |

inlinestatic

Definition at line 1052 of file easy_parser.hpp.

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

- restinio/helpers/easy_parser.hpp