![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <value.hh>
Public Member Functions | |
| virtual std::string | showType () const =0 |
| virtual std::string | typeOf () const =0 |
| virtual std::string | coerceToString (EvalState &state, const PosIdx &pos, NixStringContext &context, bool copyMore, bool copyToStore) const |
| virtual bool | operator== (const ExternalValueBase &b) const noexcept |
| virtual nlohmann::json | printValueAsJSON (EvalState &state, bool strict, NixStringContext &context, bool copyToStore=true) const |
| virtual void | printValueAsXML (EvalState &state, bool strict, bool location, XMLWriter &doc, NixStringContext &context, StringSet &drvsSeen, const PosIdx pos) const |
Protected Member Functions | |
| virtual std::ostream & | print (std::ostream &str) const =0 |
Friends | |
| class | Printer |
| std::ostream & | operator<< (std::ostream &str, const ExternalValueBase &v) |
External values must descend from ExternalValueBase, so that type-agnostic nix functions (e.g. showType) can be implemented
|
virtual |
Coerce the value to a string. Defaults to uncoercable, i.e. throws an error.
|
virtualnoexcept |
Compare to another value of the same type. Defaults to uncomparable, i.e. always false.
|
protectedpure virtual |
Print out the value
Implemented in nix::LazyFetcherAttr.
|
virtual |
Print the value as JSON. Defaults to unconvertible, i.e. throws an error
|
virtual |
Print the value as XML. Defaults to unevaluated
|
pure virtual |
Return a simple string describing the type
Implemented in nix::LazyFetcherAttr.
|
pure virtual |
Return a string to be used in builtins.typeOf
Implemented in nix::LazyFetcherAttr.