Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:10:46

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/url
0008 //
0009 
0010 #ifndef BOOST_URL_RFC_URI_RULE_HPP
0011 #define BOOST_URL_RFC_URI_RULE_HPP
0012 
0013 #include <boost/url/detail/config.hpp>
0014 #include <boost/url/error_types.hpp>
0015 #include <boost/url/url_view.hpp>
0016 
0017 namespace boost {
0018 namespace urls {
0019 
0020 /** Rule for URI
0021 
0022     @par Value Type
0023     @code
0024     using value_type = url_view;
0025     @endcode
0026 
0027     @par Example
0028     Rules are used with the function @ref grammar::parse.
0029     @code
0030     system::result< url_view > rv = grammar::parse( "https://www.example.com/index.htm?id=guest#s1", uri_rule );
0031     @endcode
0032 
0033     @par BNF
0034     @code
0035     URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
0036     @endcode
0037 
0038     @par Specification
0039     @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3"
0040         >3. Syntax Components (rfc3986)</a>
0041 
0042     @see
0043         @ref grammar::parse,
0044         @ref parse_uri,
0045         @ref url_view.
0046 */
0047 #ifdef BOOST_URL_DOCS
0048 constexpr __implementation_defined__ uri_rule{};
0049 #else
0050 namespace implementation_defined {
0051 struct uri_rule_t
0052 {
0053     using value_type = url_view;
0054 
0055     BOOST_URL_DECL
0056     auto
0057     parse(
0058         char const*& it,
0059         char const* const end
0060             ) const noexcept ->
0061         system::result<value_type>;
0062 };
0063 } // implementation_defined
0064 
0065 /** Rule for URI
0066 
0067     @par Value Type
0068     @code
0069     using value_type = url_view;
0070     @endcode
0071 
0072     @par Example
0073     Rules are used with the function @ref grammar::parse.
0074     @code
0075     system::result< url_view > rv = grammar::parse( "https://www.example.com/index.htm?id=guest#s1", uri_rule );
0076     @endcode
0077 
0078     @par BNF
0079     @code
0080     URI           = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
0081     @endcode
0082 
0083     @par Specification
0084     @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3"
0085         >3. Syntax Components (rfc3986)</a>
0086 
0087     @see
0088         @ref grammar::parse,
0089         @ref parse_uri,
0090         @ref url_view.
0091 */
0092 constexpr implementation_defined::uri_rule_t uri_rule{};
0093 #endif
0094 
0095 } // urls
0096 } // boost
0097 
0098 #endif