1#ifndef NIX_API_EXTERNAL_H
2#define NIX_API_EXTERNAL_H
126 int (*
equal)(
void *self,
void *other);
nix_err nix_external_add_string_context(nix_c_context *context, nix_string_context *string_context, const char *c)
struct nix_string_return nix_string_return
Represents a string owned by nix.
Definition: nix_api_external.h:28
void nix_set_string_return(nix_string_return *str, const char *c)
Sets the contents of a nix_string_return.
struct nix_string_context nix_string_context
A list of string context items.
Definition: nix_api_external.h:36
ExternalValue * nix_create_external_value(nix_c_context *context, NixCExternalValueDesc *desc, void *v)
Create an external value, that can be given to nix_set_external.
nix_err nix_external_print(nix_c_context *context, nix_printer *printer, const char *str)
struct nix_printer nix_printer
Wraps a stream that can output multiple string pieces.
Definition: nix_api_external.h:32
void * nix_get_external_value_content(nix_c_context *context, ExternalValue *b)
Extract the pointer from a nix c external value.
struct ExternalValue ExternalValue
External Value.
Definition: nix_api_value.h:61
int nix_err
Type for error codes in the NIX system.
Definition: nix_api_util.h:59
Main entry for the libexpr C bindings.
Main entry for the libutil C bindings.
libexpr C bindings dealing with values
Definition for a class of external values.
Definition: nix_api_external.h:79
void(* print)(void *self, nix_printer *printer)
Called when printing the external value.
Definition: nix_api_external.h:86
int(* equal)(void *self, void *other)
Try to compare two external values.
Definition: nix_api_external.h:126
void(* showType)(void *self, nix_string_return *res)
Called on :t.
Definition: nix_api_external.h:92
void(* typeOf)(void *self, nix_string_return *res)
Called on builtins.typeOf
Definition: nix_api_external.h:98
void(* coerceToString)(void *self, nix_string_context *c, int coerceMore, int copyToStore, nix_string_return *res)
Called on "${str}" and builtins.toString.
Definition: nix_api_external.h:113
void(* printValueAsJSON)(void *self, State *, int strict, nix_string_context *c, bool copyToStore, nix_string_return *res)
Convert the external value to json.
Definition: nix_api_external.h:140
void(* printValueAsXML)(void *self, State *, int strict, int location, void *doc, nix_string_context *c, void *drvsSeen, int pos)
Convert the external value to XML.
Definition: nix_api_external.h:159
Represents a nix evaluator state.
This object stores error state.