nixd
Loading...
Searching...
No Matches
include/nixd/Protocol/Protocol.h
Go to the documentation of this file.
1#pragma once
2
3#include <llvm/Support/JSON.h>
4
5#include <cstdint>
6#include <string>
7
8namespace nixd::rpc {
9
10enum class LogLevel {
11 Debug,
12 Info,
13 Warning,
14 Error,
15};
16
18 std::string Shm;
19 std::string BasePath;
20 std::string CachePath;
21 std::int64_t Size;
22};
23
24llvm::json::Value toJSON(const RegisterBCParams &Params);
25bool fromJSON(const llvm::json::Value &Params, RegisterBCParams &R,
26 llvm::json::Path P);
27
29 std::int64_t ExprID;
30};
31
32llvm::json::Value toJSON(const ExprValueParams &Params);
33bool fromJSON(const llvm::json::Value &Params, ExprValueParams &R,
34 llvm::json::Path P);
35
38 /// \brief The expr is not found in the registered bytecodes.
40
41 /// \brief The expr is found, but the value is not evaluated. e.g. too deep
43
44 /// \brief Encountered an error when evaluating the value.
46
47 /// \brief The value is available.
49 };
51 /// \brief The value ID, for future reference.
52 ///
53 /// We may want to query the value of the same expr multiple times, with more
54 /// detailed information.
55 std::int64_t ValueID;
56
57 /// \brief Opaque data, the value of the expr.
61 };
63};
64
65llvm::json::Value toJSON(const ExprValueResponse &Params);
66bool fromJSON(const llvm::json::Value &Params, ExprValueResponse &R,
67 llvm::json::Path P);
68
69} // namespace nixd::rpc
bool fromJSON(const llvm::json::Value &Params, RegisterBCParams &R, llvm::json::Path P)
llvm::json::Value toJSON(const RegisterBCParams &Params)
ValueKinds
Opaque data, the value of the expr.
@ EvalError
Encountered an error when evaluating the value.
@ NotFound
The expr is not found in the registered bytecodes.
@ NotEvaluated
The expr is found, but the value is not evaluated. e.g. too deep.
std::int64_t ValueID
The value ID, for future reference.