|
void | print (EvalState &state, std::ostream &str, PrintOptions options=PrintOptions {}) |
|
bool | isThunk () const |
|
bool | isApp () const |
|
bool | isBlackhole () const |
|
bool | isLambda () const |
|
bool | isPrimOp () const |
|
bool | isPrimOpApp () const |
|
ValueType | type (bool invalidIsThunk=false) const |
|
void | finishValue (InternalType newType, Payload newPayload) |
|
bool | isValid () const |
|
void | mkInt (NixInt::Inner n) |
|
void | mkInt (NixInt n) |
|
void | mkBool (bool b) |
|
void | mkString (const char *s, const char **context=0) |
|
void | mkString (std::string_view s) |
|
void | mkString (std::string_view s, const NixStringContext &context) |
|
void | mkStringMove (const char *s, const NixStringContext &context) |
|
void | mkString (const SymbolStr &s) |
|
void | mkPath (const SourcePath &path) |
|
void | mkPath (std::string_view path) |
|
void | mkPath (SourceAccessor *accessor, const char *path) |
|
void | mkNull () |
|
void | mkAttrs (Bindings *a) |
|
Value & | mkAttrs (BindingsBuilder &bindings) |
|
void | mkList (const ListBuilder &builder) |
|
void | mkThunk (Env *e, Expr *ex) |
|
void | mkApp (Value *l, Value *r) |
|
void | mkLambda (Env *e, ExprLambda *f) |
|
void | mkBlackhole () |
|
void | mkPrimOp (PrimOp *p) |
|
void | mkPrimOpApp (Value *l, Value *r) |
|
const PrimOp * | primOpAppPrimOp () const |
|
void | mkExternal (ExternalValueBase *e) |
|
void | mkFloat (NixFloat n) |
|
bool | isList () const |
|
Value *const * | listElems () |
|
std::span< Value *const > | listItems () const |
|
Value *const * | listElems () const |
|
size_t | listSize () const |
|
PosIdx | determinePos (const PosIdx pos) const |
|
bool | isTrivial () const |
|
SourcePath | path () const |
|
std::string_view | string_view () const |
|
const char * | c_str () const |
|
const char ** | context () const |
|
ExternalValueBase * | external () const |
|
const Bindings * | attrs () const |
|
const PrimOp * | primOp () const |
|
bool | boolean () const |
|
NixInt | integer () const |
|
NixFloat | fpoint () const |
|
|
std::string | showType (const Value &v) |
|
◆ Payload
using nix::Value::Payload |
Initial value: union
{
NixInt integer;
bool boolean;
struct {
size_t size;
} bigList;
NixFloat fpoint;
}
Definition attr-set.hh:48
◆ isTrivial()
bool nix::Value::isTrivial |
( |
| ) |
const |
Check whether forcing this value requires a trivial amount of computation. In particular, function applications are non-trivial.
◆ isValid()
bool nix::Value::isValid |
( |
| ) |
const |
|
inline |
A value becomes valid when it is initialized. We don't use this in the evaluator; only in the bindings, where the slight extra cost is warranted because of inexperienced callers.
◆ primOpAppPrimOp()
const PrimOp * nix::Value::primOpAppPrimOp |
( |
| ) |
const |
For a tPrimOpApp
value, get the original PrimOp
value.
◆ type()
ValueType nix::Value::type |
( |
bool | invalidIsThunk = false | ) |
const |
|
inline |
Returns the normal type of a Value. This only returns nThunk if the Value hasn't been forceValue'd
- Parameters
-
invalidIsThunk | Instead of aborting an an invalid (probably 0, so uninitialized) internal type, return nThunk . |
The documentation for this struct was generated from the following files:
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libexpr/value.hh
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libexpr/attr-set.cc
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libexpr/eval.cc