Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
url.hh File Reference
#include "lix/libutil/error.hh"
#include <map>

Go to the source code of this file.

Classes

struct  nix::ParsedURL
struct  nix::ParsedUrlScheme

Functions

 nix::MakeError (BadURL, Error)
std::string nix::percentDecode (std::string_view in)
std::string nix::percentEncode (std::string_view s, std::string_view keep)
std::map< std::string, std::string > nix::decodeQuery (const std::string &query)
ParsedURL nix::parseURL (const std::string &url)
ParsedUrlScheme nix::parseUrlScheme (std::string_view scheme)

Function Documentation

◆ parseUrlScheme()

ParsedUrlScheme nix::parseUrlScheme ( std::string_view scheme)

Parse a URL scheme of the form '(applicationScheme+)?transportScheme' into a tuple '(applicationScheme, transportScheme)'

parseUrlScheme("http") == ParsedUrlScheme{ {}, "http"} parseUrlScheme("tarball+http") == ParsedUrlScheme{ {"tarball"}, "http"}