RESTinio
Loading...
Searching...
No Matches
restinio::http_field_parsers::range_details Namespace Reference

Classes

struct  byte_ranges_specifier_t
 A struct that holds a container of byte_range_specs. More...
struct  double_ended_range_t
 Value of range for the case where both ends of the range are defined. More...
struct  open_ended_range_t
 Value of range for the case where only left border of the range is defined. More...
struct  other_ranges_specifier_t
 A description of a range value of units those are not "bytes". More...
struct  suffix_length_t
 Value of range for the case where only length of range's suffix is defined. More...

Typedefs

template<typename T>
using byte_range_spec_t
 Variant type for all possible cases of specification for one range.
template<typename T>
using value_t
 Variant type for holding parsed value of Range HTTP-field.

Functions

template<typename T>
auto make_byte_range_spec_parser ()
 Factory for creation of a parser for byte_range_spec values.
auto make_bytes_prefix_parser ()
 Factory for a parser of 'bytes=' prefix.
template<typename T>
auto make_byte_ranges_specifier_parser ()
 Factory for creation of a parser for byte_ranges_specifier values.
auto make_other_ranges_specifier_parser ()
 Factory for creation of a parser for other_ranges_specifier values.

Typedef Documentation

◆ byte_range_spec_t

Initial value:
std::variant<
Value of range for the case where both ends of the range are defined.
Definition range.hpp:40
Value of range for the case where only left border of the range is defined.
Definition range.hpp:58
Value of range for the case where only length of range's suffix is defined.
Definition range.hpp:75

Variant type for all possible cases of specification for one range.

Since
v.0.6.2

Definition at line 85 of file range.hpp.

◆ value_t

Initial value:
std::variant<
A struct that holds a container of byte_range_specs.
Definition range.hpp:97
A description of a range value of units those are not "bytes".
Definition range.hpp:115

Variant type for holding parsed value of Range HTTP-field.

Since
v.0.6.2

Definition at line 126 of file range.hpp.

Function Documentation

◆ make_byte_range_spec_parser()

template<typename T>
auto restinio::http_field_parsers::range_details::make_byte_range_spec_parser ( )
nodiscard

Factory for creation of a parser for byte_range_spec values.

Creates a parser for the following rule:

byte-range-spec = byte-range / suffix-byte-range-spec

byte-range      = first-byte-pos "-" [ last-byte-pos ]
first-byte-pos  = 1*DIGIT
last-byte-pos   = 1*DIGIT

suffix-byte-range-spec = "-" suffix-length
suffix-length = 1*DIGIT

The parser returned produces value of byte_range_spec_t<T>.

Since
v.0.6.2

Definition at line 152 of file range.hpp.

◆ make_byte_ranges_specifier_parser()

template<typename T>
auto restinio::http_field_parsers::range_details::make_byte_ranges_specifier_parser ( )
nodiscard

Factory for creation of a parser for byte_ranges_specifier values.

Creates a parser for the following rule:

byte-ranges-specifier = bytes-unit "=" byte-range-set
byte-range-set  = 1#( byte-range-spec / suffix-byte-range-spec )
byte-range-spec = first-byte-pos "-" [ last-byte-pos ]
first-byte-pos  = 1*DIGIT
last-byte-pos   = 1*DIGIT

suffix-byte-range-spec = "-" suffix-length
suffix-length = 1*DIGIT

The parser returned produces value of byte_ranges_specifier_t<T>.

Since
v.0.6.2

Definition at line 211 of file range.hpp.

◆ make_bytes_prefix_parser()

auto restinio::http_field_parsers::range_details::make_bytes_prefix_parser ( )
inlinenodiscard

Factory for a parser of 'bytes=' prefix.

Since
v.0.6.2

Definition at line 184 of file range.hpp.

◆ make_other_ranges_specifier_parser()

auto restinio::http_field_parsers::range_details::make_other_ranges_specifier_parser ( )
inlinenodiscard

Factory for creation of a parser for other_ranges_specifier values.

Creates a parser for the following rule:

other-ranges-specifier = other-range-unit "=" other-range-set
other-range-set = 1*VCHAR

The parser returned produces value of other_ranges_specifier_t.

Since
v.0.6.2

Definition at line 239 of file range.hpp.