We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c36d8f commit aa45edcCopy full SHA for aa45edc
lib/elixir/lib/kernel.ex
@@ -1474,6 +1474,15 @@ defmodule Kernel do
1474
1475
When defining a type, all the fields not mentioned in the type are
1476
assumed to have type `term`.
1477
+
1478
+ ## Importing records
1479
1480
+ It is also possible to import a public record (a record, defined using
1481
+ `defrecord`) as a set of private macros (as if it was defined using `defrecordp`):
1482
1483
+ Record.import Config, as: :config
1484
1485
+ See `Record.import/2` documentation for more information
1486
"""
1487
defmacro defrecord(name, fields, opts // [], do_block // []) do
1488
Record.defrecord(name, fields, Keyword.merge(opts, do_block))
0 commit comments