pub fn urlsplit(
url: &str,
scheme: &str,
allow_fragments: bool,
) -> Result<SplitResult, UrlError>Expand description
Parse a URL into 5 components: scheme://netloc/path?query#fragment. Port of urlsplit.
scheme is the default scheme used when the URL has none; pass "" for no default.
allow_fragments controls whether a #fragment is split off. Note: % escapes are not
expanded.
Returns UrlError for a malformed bracketed authority (mismatched brackets, data outside the
brackets, IPv4-in-brackets, or a non-IP host) or a non-ASCII authority that hides a delimiter
under NFKC normalization (_checknetloc).