NativeElixirPdfUtilities.Validators.ObjectValidator (native_elixir_pdf_utilities v1.1.0)
View SourceValidation and selection of local object and embedded-document sources.
The selected-source types describe the values consumed by the embedded viewport pipeline. Resource authorization remains in the owning resource validator.
Summary
Functions
Authorizes a selected local object/embed resource without inline document descriptors.
Normalizes the supported selected-file MIME vocabulary before reads.
Validates a selected dispatch plan and its host before any file work.
Selects static fallback, blank initialization, an empty embed or a supported local resource before lookup.
Checks selected resource content against file MIME evidence before decoding.
Types
Functions
@spec authorize_html( term(), NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), term() ) :: {:ok, NativeElixirPdfUtilities.Validators.ResourceValidator.document_descriptor(), NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t()} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Authorizes a selected local object/embed resource without inline document descriptors.
@spec prepare_mime(term()) :: {:ok, String.t()} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Normalizes the supported selected-file MIME vocabulary before reads.
@spec prepare_selection(term(), term()) :: {:ok, :document | :image | :blank, String.t() | nil, String.t() | nil} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Validates a selected dispatch plan and its host before any file work.
@spec select( map(), NativeElixirPdfUtilities.HtmlToPdf.ResourceContext.t(), :object | :embed ) :: {:ok, selected()} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Selects static fallback, blank initialization, an empty embed or a supported local resource before lookup.
@spec validate_content(binary(), {:file, String.t()}, String.t()) :: :ok | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Checks selected resource content against file MIME evidence before decoding.