Packages
bond
0.1.0
1.13.0
1.12.0
1.11.0
1.10.1
1.10.0
1.9.0
1.8.0
1.7.0
1.6.0
1.5.0
1.4.0
1.3.0
1.3.0-rc.1
1.2.1
1.2.0
1.1.0
1.0.0
1.0.0-rc.4
1.0.0-rc.3
1.0.0-rc.2
1.0.0-rc.1
0.18.0
0.17.5
0.17.4
0.17.3
0.17.2
0.17.1
0.17.0
0.16.2
0.16.1
0.16.0
0.15.0
0.14.0
0.13.0
0.12.0
0.11.0
0.10.0
0.9.1
0.9.0
0.8.3
0.8.2
0.8.1
0.1.0
Design by Contract (DbC) for Elixir
Current section
Files
Jump to
Current section
Files
lib/bond/env.ex
defmodule Bond.Env do
@moduledoc internal: true
@moduledoc """
Subset of `Macro.Env` struct that excludes fields that, according to the documentation, "are
private to Elixir's macro expansion mechanism".
"""
defstruct [:context, :context_modules, :file, :function, :line, :module]
def new(%Macro.Env{} = env \\ __ENV__) do
struct(__MODULE__, Map.from_struct(env))
end
end