Current section

Files

Jump to
html_to_markdown lib html_to_markdown preprocessing_options_update.ex
Raw

lib/html_to_markdown/preprocessing_options_update.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:df03cfa1ea58fc063ec7e305db2e9dcdc739bb4b063899fc4750f8584c5bd37e
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule HtmlToMarkdown.PreprocessingOptionsUpdate do
@moduledoc """
Partial update for `PreprocessingOptions`.
This struct uses `Option<T>` to represent optional fields that can be selectively updated.
Only specified fields (Some values) will override existing options; None values leave the
corresponding fields unchanged when applied via [`PreprocessingOptions::apply_update`].
"""
@typedoc "Partial update for `PreprocessingOptions`."
@type t :: %__MODULE__{
enabled: boolean() | nil,
preset: String.t() | nil | nil,
remove_navigation: boolean() | nil,
remove_forms: boolean() | nil
}
defstruct enabled: nil,
preset: nil,
remove_navigation: nil,
remove_forms: nil
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