You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It will be nice if you can pass a few structs and get something like:
from %{"Command" => "string", "Created" => 1459328030, "HostConfig" => %{"NetworkMode" => "default"}}
to %Container{command: "string", created: 1459328030, %HostConfig{network_mode: "default"}}
if it possible. Maybe from nested module:
defmodule Constructor do
defmodule Container do
defstruct command: 1, created: 2, host_config: 3
use ExConstructor
end
defmodule HostConfig do
defstruct network_mode: 1 #(or 4)
use ExConstructor
end
end
The text was updated successfully, but these errors were encountered:
@jschoch Sorry for the delayed reply. The PR you reference doesn't make nested structs work in a configurable way. I like the syntax proposal in #18, so I am going to use that as the active ticket for this going forward. 👍
It will be nice if you can pass a few structs and get something like:
from
%{"Command" => "string", "Created" => 1459328030, "HostConfig" => %{"NetworkMode" => "default"}}
to
%Container{command: "string", created: 1459328030, %HostConfig{network_mode: "default"}}
if it possible. Maybe from nested module:
The text was updated successfully, but these errors were encountered: