# `DocShell.Presentation.Limits`
[🔗](https://github.com/futhr/doc_shell/blob/v2.0.0/lib/doc_shell/presentation/limits.ex#L1)

Finite resource ceilings for site projection and static export.

Hosts may lower or explicitly raise a ceiling with a positive integer. There
is no unlimited sentinel. Limit errors name the resource, observed value and
admitted maximum.

# `t`

```elixir
@type t() :: %DocShell.Presentation.Limits{
  max_ast_depth: pos_integer(),
  max_collections: pos_integer(),
  max_file_bytes: pos_integer(),
  max_identity_bytes: pos_integer(),
  max_navigation_depth: pos_integer(),
  max_output_bytes: pos_integer(),
  max_output_files: pos_integer(),
  max_page_bytes: pos_integer(),
  max_pages: pos_integer(),
  max_redirects: pos_integer(),
  max_route_bytes: pos_integer()
}
```

Validated site resource ceilings.

# `check`

```elixir
@spec check(t(), atom(), non_neg_integer()) :: :ok | {:error, term()}
```

Checks one observed resource count against the corresponding ceiling.

# `new`

```elixir
@spec new(keyword()) :: {:ok, t()} | {:error, term()}
```

Builds a limits value from a closed keyword list of positive integers.

# `normalize`

```elixir
@spec normalize(t() | keyword()) :: {:ok, t()} | {:error, term()}
```

Accepts an existing limits value or validates a keyword override list.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
