![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <attr-set.hh>
Classes | |
| class | iterator |
Public Types | |
| using | size_type = uint32_t |
| using | const_iterator = iterator |
Public Member Functions | |
| size_type | size () const |
| bool | empty () const |
| void | push_back (const Attr &attr) |
| const Attr * | get (Symbol name) const noexcept |
| bool | isLayerListFull () const noexcept |
| bool | isLayered () const noexcept |
| const_iterator | begin () const |
| const_iterator | end () const |
| Attr & | operator[] (size_type pos) |
| const Attr & | operator[] (size_type pos) const |
| void | sort () |
| std::vector< const Attr * > | lexicographicOrder (const SymbolTable &symbols) const |
Public Attributes | |
| PosIdx | pos |
Static Public Attributes | |
| static const constinit Bindings | emptyBindings |
Friends | |
| class | BindingsBuilder |
| class | EvalMemory |
Bindings contains all the attributes of an attribute set. It is defined by its size and its capacity, the capacity being the number of Attr elements allocated after this structure, while the size corresponds to the number of elements already inserted in this structure.
Bindings can be efficiently //-composed into an intrusive linked list of "layers" that saves on copies and allocations. Each lookup (
Get attribute by name or nullptr if no such attribute exists.
|
inlinenoexcept |
Test if the length of the linked list of layers is greater than 1.
|
inlinenoexcept |
Check if the layer chain is full.
|
inline |
Returns the attributes in lexicographically sorted order.
|
staticconstinit |
An instance of bindings objects with 0 attributes. This object must never be modified.