Is it possible to define a struct inside a using
defmodule Structor do
defmacro __using__(_) do
quote do
defmodule __MODULE__ do
defstruct [:field]
end
def create(field) do
%__MODULE__{field: field}
end
end
end
end
defmodule MyStruct do
use Structor
end






















