restinio::http_field_parsers::user_agent_value_t Struct Reference

Tools for working with the value of User-Agent HTTP-field. More...

`#include <user-agent.hpp>`

## Classes

struct | product_t
| A type for holding an info about a product. More...

## Public Types

using | tail_item_t = restinio::variant_t< product_t, std::string >
| A type for holding an info about a product or a comment. More...

## Static Public Member Functions

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

## Public Attributes

product_t | product
std::vector< tail_item_t > | tail

## Detailed Description

Tools for working with the value of User-Agent HTTP-field.

This struct represents parsed value of HTTP-field User-Agent (see https://tools.ietf.org/html/rfc7231#section-5.5.3):

         User-Agent = product *( RWS ( product / comment ) )

         product         = token ["/" product-version]
         product-version = token

Since
  v.0.6.4

Definition at line 41 of file user-agent.hpp.

## Member Typedef Documentation

## tail_item_t

using restinio::http_field_parsers::user_agent_value_t::tail_item_t = restinio::variant_t< product_t, std::string >

A type for holding an info about a product or a comment.

Since
  v.0.6.4

Definition at line 59 of file user-agent.hpp.

## Member Function Documentation

## make_parser()

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

inlinestatic

A factory function for a parser of User-Agent value.

Since
  v.0.6.4

Definition at line 71 of file user-agent.hpp.

## try_parse()

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

inlinestatic

An attempt to parse User-Agent HTTP-field.

Since
  v.0.6.4

Definition at line 103 of file user-agent.hpp.

## Member Data Documentation

## product

product_t restinio::http_field_parsers::user_agent_value_t::product

Definition at line 61 of file user-agent.hpp.

## tail

std::vector< tail_item_t > restinio::http_field_parsers::user_agent_value_t::tail

Definition at line 62 of file user-agent.hpp.

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

- restinio/helpers/http_field_parsers/user-agent.hpp