restinio::http_field_parsers::accept_language_value_t Struct Reference

Tools for working with the value of Accept-Language HTTP-field. More...

`#include <accept-language.hpp>`

## Classes

struct | item_t

## Public Types

using | item_container_t = std::vector< item_t >

## Static Public Member Functions

static RESTINIO_NODISCARD auto | make_parser ()
| A factory function for a parser of Accept-Language value. More...
static RESTINIO_NODISCARD expected_t< accept_language_value_t, restinio::easy_parser::parse_error_t > | try_parse (string_view_t what)
| An attempt to parse Accept-Language HTTP-field. More...

## Public Attributes

item_container_t | languages

## Detailed Description

Tools for working with the value of Accept-Language HTTP-field.

This struct represents parsed value of HTTP-field Accept-Charset (see https://tools.ietf.org/html/rfc7231#section-5.3.5 and https://tools.ietf.org/html/rfc4647#section-2.1):

    Accept-Language = 1#( language-range [ weight ] )
    language-range  = (1*8ALPHA *("-" 1*8alphanum)) / "*"
    alphanum        = ALPHA / DIGIT

Note
  Values of `language-range` keep their case during parsing (it means that they are not converted to lower or upper case).

Since
  v.0.6.2

Definition at line 76 of file accept-language.hpp.

## Member Typedef Documentation

## item_container_t

using restinio::http_field_parsers::accept_language_value_t::item_container_t = std::vector< item_t >

Definition at line 84 of file accept-language.hpp.

## Member Function Documentation

## make_parser()

static RESTINIO_NODISCARD auto restinio::http_field_parsers::accept_language_value_t::make_parser | ( |  | ) |

inlinestatic

A factory function for a parser of Accept-Language value.

Since
  v.0.6.2

Definition at line 95 of file accept-language.hpp.

## try_parse()

static RESTINIO_NODISCARD expected_t< accept_language_value_t, restinio::easy_parser::parse_error_t > restinio::http_field_parsers::accept_language_value_t::try_parse | ( | string_view_t | what | ) |

inlinestatic

An attempt to parse Accept-Language HTTP-field.

Since
  v.0.6.2

Definition at line 116 of file accept-language.hpp.

## Member Data Documentation

## languages

item_container_t restinio::http_field_parsers::accept_language_value_t::languages

Definition at line 86 of file accept-language.hpp.

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

- restinio/helpers/http_field_parsers/accept-language.hpp