Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //
0002 // Copyright (c) 2023 Alan de Freitas (alandefreitas@gmail.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_DETAIL_IPV6ADDRZ_RULE_HPP
0011 #define BOOST_URL_RFC_DETAIL_IPV6ADDRZ_RULE_HPP
0012 
0013 #include <boost/url/error_types.hpp>
0014 #include <boost/url/ipv6_address.hpp>
0015 #include <boost/url/pct_string_view.hpp>
0016 #include <boost/core/detail/string_view.hpp>
0017 
0018 namespace boost {
0019 namespace urls {
0020 namespace detail {
0021 
0022 /** Rule for IPvFuture
0023 
0024     @par BNF
0025     @code
0026     IPv6addrz = IPv6address "%25" ZoneID
0027     ZoneID = 1*( unreserved / pct-encoded )
0028     @endcode
0029 
0030     @par Specification
0031     @li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2"
0032         >3.2.2. Host (rfc3986)</a>
0033 */
0034 struct ipv6_addrz_rule_t
0035 {
0036     struct value_type
0037     {
0038         ipv6_address ipv6;
0039         pct_string_view zone_id;
0040     };
0041 
0042     auto
0043     parse(
0044         char const*& it,
0045         char const* const end
0046             ) const noexcept ->
0047         system::result<value_type>;
0048 };
0049 
0050 constexpr ipv6_addrz_rule_t ipv6_addrz_rule{};
0051 
0052 } // detail
0053 } // urls
0054 } // boost
0055 
0056 #endif