Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
search-path.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <optional>
5
6
#include "
nix/util/types.hh
"
7
#include "
nix/util/comparator.hh
"
8
9
namespace
nix {
10
15
struct
LookupPath
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
62
struct
LookupPath::Prefix
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
82
struct
LookupPath::Path
83
{
89
std::string
s
;
90
91
GENERATE_CMP(
LookupPath::Path
, me->
s
);
92
};
93
94
struct
LookupPath::Elem
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
}
// namespace nix
comparator.hh
nix::LookupPath::Elem
Definition
search-path.hh:95
nix::LookupPath::Elem::parse
static LookupPath::Elem parse(std::string_view rawElem)
Definition
search-path.cc:26
nix::LookupPath::Path
Definition
search-path.hh:83
nix::LookupPath::Path::s
std::string s
Definition
search-path.hh:89
nix::LookupPath::Prefix
Definition
search-path.hh:63
nix::LookupPath::Prefix::s
std::string s
Definition
search-path.hh:69
nix::LookupPath::Prefix::suffixIfPotentialMatch
std::optional< std::string_view > suffixIfPotentialMatch(std::string_view path) const
Definition
search-path.cc:5
nix::LookupPath
Definition
search-path.hh:16
nix::LookupPath::elements
std::list< LookupPath::Elem > elements
Definition
search-path.hh:54
nix::LookupPath::parse
static LookupPath parse(const Strings &rawElems)
Definition
search-path.cc:42
types.hh
libexpr
include
nix
expr
search-path.hh
Generated by
1.18.0