Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:53:28

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 struct authority_rule_t
0051 {
0052     using value_type = authority_view;
0053 
0054     BOOST_URL_DECL
0055     auto
0056     parse(
0057         char const*& it,
0058         char const* end
0059             ) const noexcept ->
0060         system::result<value_type>;
0061 };
0062 
0063 constexpr authority_rule_t authority_rule{};
0064 #endif
0065 
0066 } // urls
0067 } // boost
0068 
0069 #endif