Go to the documentation of this file.
21 namespace http_field_parsers
24 namespace range_details
38 template<
typename T >
56 template<
typename T >
73 template<
typename T >
84 template<
typename T >
95 template<
typename T >
98 std::vector< byte_range_spec_t<T> >
ranges;
125 template<
typename T >
149 template<
typename T >
154 return produce< byte_range_spec_t<T> >(
157 non_negative_decimal_number_p<T>()
160 non_negative_decimal_number_p<T>()
164 non_negative_decimal_number_p<T>()
170 non_negative_decimal_number_p<T>()
208 template<
typename T >
213 return produce< byte_ranges_specifier_t<T> >(
218 make_byte_range_spec_parser<T>()
241 return produce< other_ranges_specifier_t >(
245 produce< std::string >(
285 template<
typename T >
455 using namespace range_details;
457 return produce< range_value_t >(
459 make_byte_ranges_specifier_parser<T>() >>
#define RESTINIO_NODISCARD
RESTINIO_NODISCARD auto symbol(char expected) noexcept
A factory function to create a clause that expects the speficied symbol, extracts it and then skips i...
std::vector< byte_range_spec_t< T > > ranges
RESTINIO_NODISCARD auto produce(Clauses &&... clauses)
A factory function to create a producer that creates an instance of the target type by using specifie...
RESTINIO_NODISCARD auto token_p() noexcept
A factory function to create a token_producer.
constexpr std::size_t N
A special marker that means infinite repetitions.
static RESTINIO_NODISCARD auto make_parser()
A factory function for a parser of Range value.
RESTINIO_NODISCARD auto make_other_ranges_specifier_parser()
Factory for creation of a parser for other_ranges_specifier values.
nonstd::string_view string_view_t
RESTINIO_NODISCARD auto force_only_this_alternative(Clauses &&... clauses)
An alternative that should be parsed correctly or the parsing of the whole alternatives clause should...
RESTINIO_NODISCARD auto as_result() noexcept
A factory function to create a as_result_consumer.
RESTINIO_NODISCARD auto make_byte_range_spec_parser()
Factory for creation of a parser for byte_range_spec values.
RESTINIO_NODISCARD auto make_bytes_prefix_parser()
Factory for a parser of 'bytes=' prefix.
Value of range for the case where both ends of the range are defined.
A struct that holds a container of byte_range_specs.
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.
nonstd::expected< T, E > expected_t
Utilities for parsing values of http-fields.
RESTINIO_NODISCARD auto to_container()
A factory function to create a to_container_consumer.
RESTINIO_NODISCARD auto make_byte_ranges_specifier_parser()
Factory for creation of a parser for byte_ranges_specifier values.
RESTINIO_NODISCARD auto exact(string_view_t fragment)
A factory function that creates an instance of exact_fragment clause.
Value of range for the case where only length of range's suffix is defined.
RESTINIO_NODISCARD auto non_empty_comma_separated_list_p(Element_Producer element)
A factory for a producer that handles non-empty list of comma-separated values.
Tools for working with the value of Range HTTP-field.
Value of range for the case where only left border of the range is defined.
RESTINIO_NODISCARD auto alternatives(Clauses &&... clauses)
A factory function to create an alternatives clause.
RESTINIO_NODISCARD auto vchar_symbol_p()
A factory for producer of VCHAR symbols.
A description of a range value of units those are not "bytes".
RESTINIO_NODISCARD auto sequence(Clauses &&... clauses)
A factory function to create a sequence of subclauses.
static RESTINIO_NODISCARD expected_t< range_value_t, restinio::easy_parser::parse_error_t > try_parse(string_view_t what)
An attempt to parse Range HTTP-field.
RESTINIO_NODISCARD auto repeat(std::size_t min_occurences, std::size_t max_occurences, Clauses &&... clauses)
A factory function to create repetitor of subclauses.