nixd
|
Serialize nix::Expr to bytes & deserialize from bytes. More...
#include "nixt/ArrayRef.h"
#include "nixt/PtrPool.h"
#include <nixbc/Type.h>
#include <nix/nixexpr.hh>
#include "Nodes.inc"
Go to the source code of this file.
Classes | |
struct | nixt::ASTHeader |
Header of serialized AST. More... | |
Namespaces | |
namespace | nixt |
Access EvalCache in nix::EvalState . | |
Macros | |
#define | NIX_EXPR(EXPR) |
Enumerations | |
enum class | nixt::EncodeKind : uint32_t { nixt::NIX_EXPR , nixt::/home/runner/work/nixd/nixd/libnixt/include/nixt/Serialize.h , nixt::AttrNameSymbol } |
Functions | |
template<class T > requires std::is_standard_layout_v<T> && std::is_trivial_v<T> | |
std::size_t | nixt::encode (std::ostream &OS, const T &Data) |
Basic primitives. Trivial data types are just written to a stream. | |
std::size_t | nixt::encode (std::ostream &OS, const std::string &Data) |
Encode string to bytes. | |
std::size_t | nixt::encode (std::ostream &OS, const nix::Pos::Origin &Origin) |
Encode string to bytes. | |
void | nixt::encodeAST (std::ostream &OS, const nix::SymbolTable &STable, const nix::PosTable &PTable, const nix::Pos::Origin &Origin, const nix::Expr *E) |
Encode an AST. E is the root of the AST. | |
template<class T > requires std::is_standard_layout_v<T> && std::is_trivial_v<T> | |
std::size_t | nixt::decode (BytesRef Data, T &Obj) |
Basic primitives. Deocde from bytes by memcpy . | |
std::size_t | nixt::decode (BytesRef Data, std::string &Str) |
Decode string from bytes. | |
template<class T > | |
T | nixt::consume (BytesRef &Data) |
Consume bytes from Data and construct an object of type T . | |
nix::Expr * | nixt::consumeAST (BytesRef &Data, PtrPool< nix::Expr > &Pool, nix::PosTable &PTable, nix::SymbolTable &STable) |
Serialize nix::Expr to bytes & deserialize from bytes.
Nix expressions declaration.
This record file provides NIX_EXPR
macro that contains all names of nix::Expr
Definition in file Serialize.h.
#define NIX_EXPR | ( | EXPR | ) |
Definition at line 20 of file Serialize.h.