# \#records

**URL:** https://forum.elixirforum.com/tag/records/517.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Pretty print Erlang records in the iex shell](https://forum.elixirforum.com/t/pretty-print-erlang-records-in-the-iex-shell/65756)

<div class="topic-metadata">

**Author:** [@saleyn](https://forum.elixirforum.com/u/saleyn)\
**Replies:** 5\
**Last updated:** [November 8, 2026, 3:03am UTC](https://forum.elixirforum.com/t/pretty-print-erlang-records-in-the-iex-shell/65756 "2026-11-08T03:03:26Z")

</div>

Is there a way to import record definitions in the iex shell for pretty printing (similar to the rr command in the erl shell)? This would be very helpful when calling Erlang modules that return records.

---

## [EEP-79 native records and structs](https://forum.elixirforum.com/t/eep-79-native-records-and-structs/75022)

<div class="topic-metadata">

**Author:** [@cevado](https://forum.elixirforum.com/u/cevado)\
**Replies:** 13\
**Last updated:** [April 15, 2026, 11:36pm UTC](https://forum.elixirforum.com/t/eep-79-native-records-and-structs/75022 "2026-04-15T23:36:13Z")

</div>

I was reading the EEP-79, and thinking about the poor record support in Elixir(i’ve tried to discuss about that in the forum before). I see 2 clear advantages of native-records over structs, mainly it being a enforced na…

---

## [Decoding an X.509 certificate](https://forum.elixirforum.com/t/decoding-an-x-509-certificate/64473)

<div class="topic-metadata">

**Author:** [@nhpip](https://forum.elixirforum.com/u/nhpip)\
**Replies:** 10\
**Last updated:** [June 26, 2024, 12:51pm UTC](https://forum.elixirforum.com/t/decoding-an-x-509-certificate/64473 "2024-06-26T12:51:12Z")

</div>

Hi, I’ve got a project where I have to decode an X.509 certificate. I’m using Erlang’s public\_key module to decode either a PEM or DER file. I get back a beautiful Erlang record. I know I can use Record for this purpose…

---

## [Any reason for the different semantics with records in Elixir?](https://forum.elixirforum.com/t/any-reason-for-the-different-semantics-with-records-in-elixir/64003)

<div class="topic-metadata">

**Author:** [@cevado](https://forum.elixirforum.com/u/cevado)\
**Replies:** 4\
**Last updated:** [June 5, 2024, 5:17pm UTC](https://forum.elixirforum.com/t/any-reason-for-the-different-semantics-with-records-in-elixir/64003 "2024-06-05T17:17:30Z")

</div>

So I was experimenting with records in elixir and I found it very odd the different behaviour between using records in erlang. defmodule R do require Record Record.defrecord :some, \[:a, :b, :c\] end R.some({:some, 1…

---

## [Is there an equivalent to a "private constructor" for elixir structs?](https://forum.elixirforum.com/t/is-there-an-equivalent-to-a-private-constructor-for-elixir-structs/51249)

<div class="topic-metadata">

**Author:** [@kanishka](https://forum.elixirforum.com/u/kanishka)\
**Replies:** 14\
**Last updated:** [October 25, 2022, 2:04am UTC](https://forum.elixirforum.com/t/is-there-an-equivalent-to-a-private-constructor-for-elixir-structs/51249 "2022-10-25T02:04:47Z")

</div>

Are there patterns similar to having a private constructor along with a public build/validate function to guide users of a struct module to build valid instances? I understand that you may not be able to completely stop …

---

## [Is there a way to have Elixir Records without default values?](https://forum.elixirforum.com/t/is-there-a-way-to-have-elixir-records-without-default-values/46738)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 4\
**Last updated:** [April 6, 2022, 1:36pm UTC](https://forum.elixirforum.com/t/is-there-a-way-to-have-elixir-records-without-default-values/46738 "2022-04-06T13:36:58Z")

</div>

Background I am trying to find a cheap and easy way to create New Types in Elixir, and Records seem to be just what I would need. Problem However, Elixir records require one to define default values. Not only that, it a…

---

## [StructyRecord - provides a Struct-like interface for Records](https://forum.elixirforum.com/t/structyrecord-provides-a-struct-like-interface-for-records/26367)

<div class="topic-metadata">

**Author:** [@sunaku](https://forum.elixirforum.com/u/sunaku)\
**Replies:** 5\
**Last updated:** [February 20, 2021, 7:57pm UTC](https://forum.elixirforum.com/t/structyrecord-provides-a-struct-like-interface-for-records/26367 "2021-02-20T19:57:15Z")

</div>

Hey folks, I’m pleased to announce StructyRecord, my very first Elixir library! :birthday: GitHub - GitHub - sunaku/structy\_record: 🎩 Provides a Struct-like interface for Records · GitHub Hex.pm - structy\_record | Hex …

---

## [Macro to generate record and matching @type](https://forum.elixirforum.com/t/macro-to-generate-record-and-matching-type/37610)

<div class="topic-metadata">

**Author:** [@p-kraszewski](https://forum.elixirforum.com/u/p-kraszewski)\
**Replies:** 0\
**Last updated:** [February 17, 2021, 11:46am UTC](https://forum.elixirforum.com/t/macro-to-generate-record-and-matching-type/37610 "2021-02-17T11:46:05Z")

</div>

I’m looking for some pointers on how to inject a fully customized @type and defrecord definitions from macro. I’m creating a \<\<binary\>\> ↔ record() serializer/deserializer generating code based on a textual description o…

---

## [Extract Erlang record into Elixir](https://forum.elixirforum.com/t/extract-erlang-record-into-elixir/13818)

<div class="topic-metadata">

**Author:** [@Shun\_di](https://forum.elixirforum.com/u/Shun_di)\
**Replies:** 10\
**Last updated:** [April 26, 2018, 5:15am UTC](https://forum.elixirforum.com/t/extract-erlang-record-into-elixir/13818 "2018-04-26T05:15:58Z")

</div>

Hi, I’m just starting out with Elixir, however I have used Erlang for about half a year so its not to hard to make the jump across. However, I am having real trouble with using Erlang records in Elixir. I have an exis…
