LCOV - code coverage report
Current view: top level - libs/http_proto/src/rfc - content_disposition_rule.cpp (source / functions) Coverage Total Hit
Test: coverage_filtered.info Lines: 88.9 % 9 8
Test Date: 2025-12-23 17:59:40 Functions: 100.0 % 1 1

            Line data    Source code
       1              : //
       2              : // Copyright (c) 2025 Mohammad Nejati
       3              : //
       4              : // Distributed under the Boost Software License, Version 1.0. (See accompanying
       5              : // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
       6              : //
       7              : // Official repository: https://github.com/cppalliance/http_proto
       8              : //
       9              : 
      10              : #include <boost/http_proto/rfc/content_disposition_rule.hpp>
      11              : #include <boost/http_proto/rfc/token_rule.hpp>
      12              : #include <boost/http_proto/rfc/parameter.hpp>
      13              : 
      14              : namespace boost {
      15              : namespace http_proto {
      16              : namespace implementation_defined {
      17              : auto
      18           22 : content_disposition_rule_t::
      19              : parse(
      20              :     char const*& it,
      21              :     char const* end) const noexcept->
      22              :         system::result<value_type>
      23              : {   
      24           22 :     auto type = grammar::parse(it, end, token_rule);
      25           22 :     if(!type)
      26            4 :         return type.error();
      27              : 
      28           18 :     auto params = grammar::parse(it, end, parameters_rule);
      29           18 :     if(!params)
      30            0 :         return params.error();
      31              : 
      32           18 :     return value_type{ *type, *params };
      33           18 : }
      34              : 
      35              : } // implementation_defined
      36              : } // http_proto
      37              : } // boost
        

Generated by: LCOV version 2.1