This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

ryanzidago
In the official docs, it’s written that ideally structs should have less than 32 fields (source here). Do you go around that limitation?...
New

Last Three Year's Trending Top

Fl4m3Ph03n1x
Background I am trying to encode a structure into json format using the Jason library. However, this is not working as expected. Code Le...
New
chazwatkins
I’m considering writing an integration with Salesforce. Salesforce has SObjects of various types like Case, Quote, Lead, CustomObject__c...
New
kip
TLDR; What should I emit for inspect/2 output of library structs? Executable code, string representation or default (outputs the struct ...
New
budgie
What’s the best/most succinct way to define a struct that is only used inside of one module? I sometimes have structures that I want to b...
New

Trending Over Three Years Top

script
I have this struct of preload records. I want to remove __meta__ and Ecto.Association.NotLoaded from the main struct as well as from t...
New
shahryarjb
Hello, how do I get struct in array ? please see my pic : I need to get the struct’s params , like this : a.cms_post.title My output...
New
dimitarvp
Hello, Is it possible to check if an argument to a guard is a particular structure? Context: I am trying to have a defguard definition ...
New
ddoronin
Hey folks! I want to add documentation for individual fields on a struct/typedstruct, and I’m wondering about available options? I’m new ...
New
benonymus
Hey I have a list of structs and it has fields like: id, date, counter etc how would i take out every id from this list and return the i...
New
Fl4m3Ph03n1x
Background I have a TypedStruct with an optional field, :rank. This field is sometimes present and sometimes not. @derive Jason.Encode...
New
dalhorinek
Hello, I’m having a list of elixir structs and I need to store in into file for later use and I don’t want to serialise it. So I used :...
New
superruzafa
Hi! I have a couple of structs and I want to build one of them depending on some STRING as input: defmodule Mystruct1 do ... end defmod...
New
vinibrl
I’m looking for a typespec that would match, for instance: %Foo{specific_key: "abc"} %Bar{specific_key: "abc"} %Baz{specific_key: "abc"}...
New
Sebb
I want to load a json (list of objects) into list of structs in a module attribute. Seems like I need three modules for that. json [ ...
New
smanza
Hello, i’m new to Elixir and Erlang world, but I want to create mechanism to restrict the use of a module through steps involving data. S...
New
Oliver
I’m generating a module from a macro, like this: defmodule WhereTheMacroIs do defstruct [:same_for_all] defmacro generate(name) do q...
New
sdia
As the title says, can someone advises on the best way to remove the duplication in the code snippet below. I am referring to the field ...
New
otuv
Hi, Lets say I have a struct, lets say named Struct with the singular field x (default 0). When I create it I get &Struct{x: 0} Si...
New
Ettu_R
I have a struct define as follows defmodule Employee do defstruct [:fname, :lname, :id, salary: 0, job: "none"] then I made a list, co...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement