Current section
Files
Jump to
Current section
Files
lib/crawlberg/map_result.ex
# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:ed6753aa35e27ad4764a749b35d849473835fb530fcba666ac607635b1333c06
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Crawlberg.MapResult do
@moduledoc "The result of a map operation, containing discovered URLs."
@typedoc "The result of a map operation, containing discovered URLs."
@type t :: %__MODULE__{
urls: [Crawlberg.SitemapUrl.t()]
}
defstruct urls: []
defimpl Jason.Encoder do
@doc false
def encode(value, opts) do
value
|> Map.from_struct()
|> Enum.reject(fn {_k, v} -> v == nil end)
|> Enum.into(%{})
|> Jason.Encoder.encode(opts)
end
end
end