var searchIndex = {}; searchIndex["url"] = {"doc":"<a href="https://github.com/servo/rust-url"><img style="position: absolute; top: 0; left: 0; border: 0;" src="../github.png" alt="Fork me on GitHub"></a>\n<style>.sidebar { margin-top: 53px }</style>","items":[[3,"Ipv6Address","url","A 128 bit IPv6 address",null,null],[12,"pieces","","",0,null],[3,"Url","","The parsed representation of an absolute URL.",null,null],[12,"scheme","","The scheme (a.k.a. protocol) of the URL, in ASCII lower case.",1,null],[12,"scheme_data","","The components of the URL whose representation depends on where the scheme is *relative*.",1,null],[12,"query","","The query string of the URL.",1,null],[12,"fragment","","The fragment identifier of the URL.",1,null],[3,"RelativeSchemeData","","Components for URLs in a *relative* scheme such as HTTP.",null,null],[12,"username","","The username of the URL, as a possibly empty, percent-encoded string.",2,null],[12,"password","","The password of the URL.",2,null],[12,"host","","The host of the URL, either a domain name or an IPv4 address",2,null],[12,"port","","The port number of the URL.\n`None` for file-like schemes, or to indicate the default port number.",2,null],[12,"default_port","","The default port number for the URL’s scheme.\n`None` for file-like schemes.",2,null],[12,"path","","The path of the URL, as vector of percent-encoded strings.",2,null],[3,"UrlParser","","A set of optional parameters for URL parsing.",null,null],[4,"Host","","The host name of an URL.",null,null],[13,"Domain","","A (DNS) domain name or an IPv4 address.",3,null],[13,"Ipv6","","An IPv6 address, represented inside `[...]` square brackets\nso that `:` colon characters in the address are not ambiguous\nwith the port number delimiter.",3,null],[4,"ParseError","","Errors that can occur during parsing.",null,null],[13,"EmptyHost","","",4,null],[13,"InvalidScheme","","",4,null],[13,"InvalidPort","","",4,null],[13,"InvalidIpv6Address","","",4,null],[13,"InvalidDomainCharacter","","",4,null],[13,"InvalidCharacter","","",4,null],[13,"InvalidBackslash","","",4,null],[13,"InvalidPercentEncoded","","",4,null],[13,"InvalidAtSymbolInUser","","",4,null],[13,"ExpectedTwoSlashes","","",4,null],[13,"ExpectedInitialSlash","","",4,null],[13,"NonUrlCodePoint","","",4,null],[13,"RelativeUrlWithScheme","","",4,null],[13,"RelativeUrlWithoutBase","","",4,null],[13,"RelativeUrlWithNonRelativeBase","","",4,null],[13,"NonAsciiDomainsNotSupportedYet","","",4,null],[13,"CannotSetJavascriptFragment","","",4,null],[13,"CannotSetPortWithFileLikeScheme","","",4,null],[13,"CannotSetUsernameWithNonRelativeScheme","","",4,null],[13,"CannotSetPasswordWithNonRelativeScheme","","",4,null],[13,"CannotSetHostPortWithNonRelativeScheme","","",4,null],[13,"CannotSetHostWithNonRelativeScheme","","",4,null],[13,"CannotSetPortWithNonRelativeScheme","","",4,null],[13,"CannotSetPathWithNonRelativeScheme","","",4,null],[4,"SchemeData","","The components of the URL whose representation depends on where the scheme is *relative*.",null,null],[13,"Relative","","Components for URLs in a *relative* scheme such as HTTP.",5,null],[13,"NonRelative","","No further structure is assumed for *non-relative* schemes such as `data` and `mailto`.",5,null],[4,"SchemeType","","Determines the behavior of the URL parser for a given scheme.",null,null],[13,"NonRelative","","Indicate that the scheme is *non-relative*.",6,null],[13,"Relative","","Indicate that the scheme is *relative*, and what the default port number is.",6,null],[13,"FileLike","","Indicate a *relative* scheme similar to the *file* scheme.",6,null],[5,"parse_path","","Parse `input` as a “standalone” URL path,\nwith an optional query string and fragment identifier.",null,{"inputs":[{"name":"str"}],"output":{"name":"parseresult"}}],[5,"whatwg_scheme_type_mapper","","http://url.spec.whatwg.org/#relative-scheme",null,{"inputs":[{"name":"str"}],"output":{"name":"schemetype"}}],[11,"cmp","","",3,null],[11,"partial_cmp","","",3,null],[11,"lt","","",3,null],[11,"le","","",3,null],[11,"gt","","",3,null],[11,"ge","","",3,null],[11,"hash","","",3,null],[11,"fmt","","",3,null],[11,"clone","","",3,null],[11,"eq","","",3,null],[11,"ne","","",3,null],[11,"cmp","","",0,null],[11,"partial_cmp","","",0,null],[11,"lt","","",0,null],[11,"le","","",0,null],[11,"gt","","",0,null],[11,"ge","","",0,null],[11,"hash","","",0,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"clone","","",0,null],[11,"parse","","Parse a host: either an IPv6 address in [] square brackets, or a domain.",3,{"inputs":[{"name":"str"}],"output":{"name":"parseresult"}}],[11,"serialize","","Serialize the host as a string.",3,null],[11,"fmt","","",3,null],[11,"parse","","Parse an IPv6 address, without the [] square brackets.",0,{"inputs":[{"name":"str"}],"output":{"name":"parseresult"}}],[11,"serialize","","Serialize the IPv6 address to a string.",0,null],[11,"fmt","","",0,null],[11,"fmt","","",4,null],[11,"clone","","",4,null],[11,"eq","","",4,null],[11,"description","","",4,null],[11,"fmt","","",4,null],[0,"urlutils","","These methods are not meant for use in Rust code,\nonly to help implement the JavaScript URLUtils API: http://url.spec.whatwg.org/#urlutils",null,null],[3,"UrlUtilsWrapper","url::urlutils","",null,null],[12,"url","","",7,null],[12,"parser","","",7,null],[0,"percent_encoding","url","",null,null],[3,"EncodeSet","url::percent_encoding","Represents a set of characters / bytes that should be percent-encoded.",null,null],[5,"percent_encode_to","","Percent-encode the given bytes, and push the result to `output`.",null,null],[5,"percent_encode","","Percent-encode the given bytes.",null,null],[5,"utf8_percent_encode_to","","Percent-encode the UTF-8 encoding of the given string, and push the result to `output`.",null,{"inputs":[{"name":"str"},{"name":"encodeset"},{"name":"string"}],"output":null}],[5,"utf8_percent_encode","","Percent-encode the UTF-8 encoding of the given string.",null,{"inputs":[{"name":"str"},{"name":"encodeset"}],"output":{"name":"string"}}],[5,"percent_decode_to","","Percent-decode the given bytes, and push the result to `output`.",null,null],[5,"percent_decode","","Percent-decode the given bytes.",null,null],[5,"lossy_utf8_percent_decode","","Percent-decode the given bytes, and decode the result as UTF-8.",null,null],[5,"from_hex","","",null,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[7,"SIMPLE_ENCODE_SET","","This encode set is used for fragment identifier and non-relative scheme data.",null,null],[7,"QUERY_ENCODE_SET","","This encode set is used in the URL parser for query strings.",null,null],[7,"DEFAULT_ENCODE_SET","","This encode set is used for path components.",null,null],[7,"USERINFO_ENCODE_SET","","This encode set is used in the URL parser for usernames and passwords.",null,null],[7,"PASSWORD_ENCODE_SET","","This encode set should be used when setting the password field of a parsed URL.",null,null],[7,"USERNAME_ENCODE_SET","","This encode set should be used when setting the username field of a parsed URL.",null,null],[7,"FORM_URLENCODED_ENCODE_SET","","This encode set is used in `application/x-www-form-urlencoded` serialization.",null,null],[11,"clone","","",8,null],[0,"form_urlencoded","url","Parser and serializer for the [`application/x-www-form-urlencoded` format](\nhttp://url.spec.whatwg.org/#application/x-www-form-urlencoded),\nas used by HTML forms.",null,null],[5,"parse","url::form_urlencoded","Convert a byte string in the `application/x-www-form-urlencoded` format\ninto a vector of (name, value) pairs.",null,null],[5,"serialize","","Convert an iterator of (name, value) pairs\ninto a string in the `application/x-www-form-urlencoded` format.",null,{"inputs":[{"name":"i"}],"output":{"name":"string"}}],[0,"punycode","url","Punycode ([RFC 3492](http://tools.ietf.org/html/rfc3492)) implementation.",null,null],[5,"decode_to_string","url::punycode","Convert Punycode to an Unicode `String`.",null,{"inputs":[{"name":"str"}],"output":{"name":"option"}}],[5,"decode","","Convert Punycode to Unicode.",null,{"inputs":[{"name":"str"}],"output":{"name":"option"}}],[5,"encode_str","","Convert an Unicode `str` to Punycode.",null,{"inputs":[{"name":"str"}],"output":{"name":"option"}}],[5,"encode","","Convert Unicode to Punycode.",null,null],[0,"format","url","Formatting utilities for URLs.",null,null],[3,"PathFormatter","url::format","Formatter and serializer for URL path data.",null,null],[12,"path","","The path as a slice of string-like objects (String or &str).",9,null],[3,"UserInfoFormatter","","Formatter and serializer for URL username and password data.",null,null],[12,"username","","URL username as a string slice.",10,null],[12,"password","","URL password as an optional string slice.",10,null],[3,"UrlNoFragmentFormatter","","Formatter for URLs which ignores the fragment field.",null,null],[12,"url","","",11,null],[11,"fmt","","",9,null],[11,"fmt","","",10,null],[11,"fmt","","",11,null],[6,"ErrorHandler","url","This is called on non-fatal parse errors.",null,null],[6,"ParseResult","","",null,null],[11,"cmp","","",1,null],[11,"partial_cmp","","",1,null],[11,"lt","","",1,null],[11,"le","","",1,null],[11,"gt","","",1,null],[11,"ge","","",1,null],[11,"hash","","",1,null],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"cmp","","",5,null],[11,"partial_cmp","","",5,null],[11,"lt","","",5,null],[11,"le","","",5,null],[11,"gt","","",5,null],[11,"ge","","",5,null],[11,"hash","","",5,null],[11,"fmt","","",5,null],[11,"clone","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"cmp","","",2,null],[11,"partial_cmp","","",2,null],[11,"lt","","",2,null],[11,"le","","",2,null],[11,"gt","","",2,null],[11,"ge","","",2,null],[11,"hash","","",2,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"from_str","","",1,{"inputs":[{"name":"str"}],"output":{"name":"parseresult"}}],[11,"new","","Return a new UrlParser with default parameters.",12,{"inputs":[],"output":{"name":"urlparser"}}],[11,"base_url","","Set the base URL used for resolving relative URL references, and return the `UrlParser`.\nThe default is no base URL, so that relative URLs references fail to parse.",12,null],[11,"error_handler","","Set an error handler for non-fatal parse errors, and return the `UrlParser`.",12,null],[11,"scheme_type_mapper","","Set a *scheme type mapper*, and return the `UrlParser`.",12,null],[11,"parse","","Parse `input` as an URL, with all the parameters previously set in the `UrlParser`.",12,null],[11,"parse_path","","Parse `input` as a “standalone” URL path,\nwith an optional query string and fragment identifier.",12,null],[11,"cmp","","",6,null],[11,"partial_cmp","","",6,null],[11,"lt","","",6,null],[11,"le","","",6,null],[11,"gt","","",6,null],[11,"ge","","",6,null],[11,"hash","","",6,null],[11,"clone","","",6,null],[11,"fmt","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"default_port","","",6,null],[11,"same_as","","",6,null],[11,"parse","","Parse an URL with the default `UrlParser` parameters.",1,{"inputs":[{"name":"str"}],"output":{"name":"parseresult"}}],[11,"from_file_path","","Convert a file name as `std::path::Path` into an URL in the `file` scheme.",1,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[11,"from_directory_path","","Convert a directory name as `std::path::Path` into an URL in the `file` scheme.",1,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[11,"to_file_path","","Assuming the URL is in the `file` scheme or similar,\nconvert its path to an absolute `std::path::Path`.",1,null],[11,"serialize","","Return the serialization of this URL as a string.",1,null],[11,"serialize_no_fragment","","Return the serialization of this URL, without the fragment identifier, as a string",1,null],[11,"non_relative_scheme_data","","If the URL is *non-relative*, return the string scheme data.",1,null],[11,"non_relative_scheme_data_mut","","If the URL is *non-relative*, return a mutable reference to the string scheme data.",1,null],[11,"relative_scheme_data","","If the URL is in a *relative scheme*, return the structured scheme data.",1,null],[11,"relative_scheme_data_mut","","If the URL is in a *relative scheme*,\nreturn a mutable reference to the structured scheme data.",1,null],[11,"username","","If the URL is in a *relative scheme*, return its username.",1,null],[11,"username_mut","","If the URL is in a *relative scheme*, return a mutable reference to its username.",1,null],[11,"lossy_percent_decode_username","","Percent-decode the URL’s username, if any.",1,null],[11,"password","","If the URL is in a *relative scheme*, return its password, if any.",1,null],[11,"password_mut","","If the URL is in a *relative scheme*, return a mutable reference to its password, if any.",1,null],[11,"lossy_percent_decode_password","","Percent-decode the URL’s password, if any.",1,null],[11,"serialize_userinfo","","Serialize the URL's username and password, if any.",1,null],[11,"host","","If the URL is in a *relative scheme*, return its structured host.",1,null],[11,"host_mut","","If the URL is in a *relative scheme*, return a mutable reference to its structured host.",1,null],[11,"domain","","If the URL is in a *relative scheme* and its host is a domain,\nreturn the domain as a string.",1,null],[11,"domain_mut","","If the URL is in a *relative scheme* and its host is a domain,\nreturn a mutable reference to the domain string.",1,null],[11,"serialize_host","","If the URL is in a *relative scheme*, serialize its host as a string.",1,null],[11,"port","","If the URL is in a *relative scheme* and has a port number, return it.",1,null],[11,"port_mut","","If the URL is in a *relative scheme*, return a mutable reference to its port.",1,null],[11,"port_or_default","","If the URL is in a *relative scheme* that is not a file-like,\nreturn its port number, even if it is the default.",1,null],[11,"path","","If the URL is in a *relative scheme*, return its path components.",1,null],[11,"path_mut","","If the URL is in a *relative scheme*, return a mutable reference to its path components.",1,null],[11,"serialize_path","","If the URL is in a *relative scheme*, serialize its path as a string.",1,null],[11,"query_pairs","","Parse the URL’s query string, if any, as `application/x-www-form-urlencoded`\nand return a vector of (key, value) pairs.",1,null],[11,"set_query_from_pairs","","Serialize an iterator of (key, value) pairs as `application/x-www-form-urlencoded`\nand set it as the URL’s query string.",1,null],[11,"lossy_percent_decode_query","","Percent-decode the URL’s query string, if any.",1,null],[11,"lossy_percent_decode_fragment","","Percent-decode the URL’s fragment identifier, if any.",1,null],[11,"encode","","",1,null],[11,"decode","","",1,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"fmt","","",1,null],[11,"fmt","","",5,null],[11,"lossy_percent_decode_username","","Percent-decode the URL’s username.",2,null],[11,"lossy_percent_decode_password","","Percent-decode the URL’s password, if any.",2,null],[11,"to_file_path","","Assuming the URL is in the `file` scheme or similar,\nconvert its path to an absolute `std::path::Path`.",2,null],[11,"domain","","If the host is a domain, return the domain as a string.",2,null],[11,"domain_mut","","If the host is a domain, return a mutable reference to the domain string.",2,null],[11,"port_or_default","","Return the port number of the URL, even if it is the default.\nReturn `None` for file-like URLs.",2,null],[11,"serialize_path","","Serialize the path as a string.",2,null],[11,"serialize_userinfo","","Serialize the userinfo as a string.",2,null],[11,"fmt","","",2,null]],"paths":[[3,"Ipv6Address"],[3,"Url"],[3,"RelativeSchemeData"],[4,"Host"],[4,"ParseError"],[4,"SchemeData"],[4,"SchemeType"],[3,"UrlUtilsWrapper"],[3,"EncodeSet"],[3,"PathFormatter"],[3,"UserInfoFormatter"],[3,"UrlNoFragmentFormatter"],[3,"UrlParser"]]}; initSearch(searchIndex);