Dune.eval_quoted
You're seeing just the function
eval_quoted
, go back to Dune module for more information.
Specs
eval_quoted(Macro.t(), Keyword.t()) :: Dune.Success.t() | Dune.Failure.t()
Evalates the quoted ast in the sandbox.
Available options are detailed in Dune.Parser.Opts
(for parsing-time restrictions)
and in Dune.Eval.Opts
(for runtime restrictions).
Returns a Dune.Success
struct if the execution went successfully,
a Dune.Failure
else.
Examples
iex> Dune.eval_quoted(quote do: [1, 2] ++ [3, 4])
%Dune.Success{inspected: "[1, 2, 3, 4]", stdio: "", value: [1, 2, 3, 4]}
iex> Dune.eval_quoted(quote do: System.get_env())
%Dune.Failure{message: "** (DuneRestrictedError) function System.get_env/0 is restricted", type: :restricted}
iex> Dune.eval_quoted(quote do: Process.sleep(500))
%Dune.Failure{message: "Execution timeout - 50ms", type: :timeout}