Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
search-path.hh
Go to the documentation of this file.
1#pragma once
3
4#include <optional>
5
6#include "types.hh"
7#include "comparator.hh"
8
9namespace nix {
10
16{
23 struct Elem;
24
32 struct Prefix;
33
47 struct Path;
48
54 std::list<LookupPath::Elem> elements;
55
59 static LookupPath parse(const Strings & rawElems);
60};
61
63{
69 std::string s;
70
71 GENERATE_CMP(LookupPath::Prefix, me->s);
72
79 std::optional<std::string_view> suffixIfPotentialMatch(std::string_view path) const;
80};
81
83{
89 std::string s;
90
91 GENERATE_CMP(LookupPath::Path, me->s);
92};
93
95{
96
97 Prefix prefix;
98 Path path;
99
100 GENERATE_CMP(LookupPath::Elem, me->prefix, me->path);
101
105 static LookupPath::Elem parse(std::string_view rawElem);
106};
107
108}
Definition search-path.hh:95
static LookupPath::Elem parse(std::string_view rawElem)
Definition search-path.cc:30
Definition search-path.hh:83
std::string s
Definition search-path.hh:89
Definition search-path.hh:63
std::string s
Definition search-path.hh:69
std::optional< std::string_view > suffixIfPotentialMatch(std::string_view path) const
Definition search-path.cc:5
Definition search-path.hh:16
std::list< LookupPath::Elem > elements
Definition search-path.hh:54
static LookupPath parse(const Strings &rawElems)
Definition search-path.cc:47