Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-13 08:52: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_AUTHORITY_RULE_HPP
0011 #define BOOST_URL_RFC_AUTHORITY_RULE_HPP
0012 
0013 #include <boost/url/detail/config.hpp>
0014 #include <boost/url/authority_view.hpp>
0015 #include <boost/url/error_types.hpp>
0016 
0017 namespace boost {
0018 namespace urls {
0019 
0020 /** Rule for authority
0021 
0022     @par Value Type
0023     @code
0024     using value_type = authority_view;
0025     @endcode
0026 
0027     @par Example
0028     Rules are used with the function @ref grammar::parse.
0029     @code
0030     system::result< authority_view > rv = grammar::parse( "user:pass@example.com:8080", authority_rule );
0031     @endcode
0032 
0033     @par BNF
0034     @code
0035     authority   = [ userinfo "@" ] host [ ":" port ]
0036     @endcode
0037 
0038     @par Specification
0039     @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3.2"
0040         >3.2. Authority (rfc3986)</a>
0041 
0042     @see
0043         @ref authority_view,
0044         @ref grammar::parse,
0045         @ref parse_authority.
0046 */
0047 #ifdef BOOST_URL_DOCS
0048 constexpr __implementation_defined__ authority_rule;
0049 #else
0050 
0051 namespace implementation_defined {
0052 struct authority_rule_t
0053 {
0054     using value_type = authority_view;
0055 
0056     BOOST_URL_DECL
0057     auto
0058     parse(
0059         char const*& it,
0060         char const* end
0061             ) const noexcept ->
0062         system::result<value_type>;
0063 };
0064 } // implementation_defined
0065 
0066 /** Rule for authority
0067 
0068     @par Value Type
0069     @code
0070     using value_type = authority_view;
0071     @endcode
0072 
0073     @par Example
0074     Rules are used with the function @ref grammar::parse.
0075     @code
0076     system::result< authority_view > rv = grammar::parse( "user:pass@example.com:8080", authority_rule );
0077     @endcode
0078 
0079     @par BNF
0080     @code
0081     authority   = [ userinfo "@" ] host [ ":" port ]
0082     @endcode
0083 
0084     @par Specification
0085     @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3.2"
0086         >3.2. Authority (rfc3986)</a>
0087 
0088     @see
0089         @ref authority_view,
0090         @ref grammar::parse,
0091         @ref parse_authority.
0092 */
0093 constexpr implementation_defined::authority_rule_t authority_rule{};
0094 #endif
0095 
0096 } // urls
0097 } // boost
0098 
0099 #endif