# `Spectre.GAM.Scope.View`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/gam/scope/view.ex#L1)

Read-only application view derived from one Domain projection.

A view is disposable and carries no authority, Grant, credential or executor
handle.  Every collection is selected from the exact Scope and returned in a
deterministic order so callers never need to inspect the kernel projection
directly.

# `t`

```elixir
@type t() :: %Spectre.GAM.Scope.View{
  acts: [Spectre.GAM.Act.t()],
  attempts: [Spectre.GAM.Attempt.t()],
  decisions: [Spectre.GAM.Decision.t()],
  declassifications: [Spectre.GAM.Declassification.t()],
  dispatch_cancellations: [
    %{
      act_ref: String.t(),
      cause_ref: String.t(),
      reason: atom(),
      cancelled_at: non_neg_integer()
    }
  ],
  duties: [Spectre.GAM.Duty.t()],
  erasures: [Spectre.GAM.Erasure.t()],
  evidence: [Spectre.GAM.Evidence.t()],
  opening: Spectre.GAM.Scope.Opening.t(),
  outcomes: [Spectre.GAM.Outcome.t()],
  pending_act_refs: [String.t()],
  presentations: [Spectre.GAM.Presentation.t()],
  revision: non_neg_integer()
}
```

# `from_projection`

```elixir
@spec from_projection(Spectre.GAM.Domain.Projection.t(), String.t()) ::
  {:ok, t()} | {:error, term()}
```

Builds a capability-free view for an already opened Scope.

# `records`

```elixir
@spec records(Spectre.GAM.Domain.Projection.t(), String.t(), atom()) ::
  {:ok, [struct()]} | {:error, term()}
```

Selects one public collection without building the entire Scope view.

Visibility uses the same selectors as `from_projection/2`. In particular,
reading Acts or erasures does not materialize unrelated Evidence, outcomes
or the erasure closure. This is still an explicit full collection read, not
a bounded page or a second authority projection.

---

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