# `Spectre.GAM.Row`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/gam/row.ex#L1)

Decidable summary of the governed dimensions touched by a consequence.

Rows deliberately remain a small boolean vocabulary.  Domain-specific
classes, targets and quantitative limits live in `Spectre.GAM.Surface` and
`Spectre.GAM.Mandate`; a row only states which kinds of power are involved.

# `dimension`

```elixir
@type dimension() ::
  :attempt
  | :observe
  | :read
  | :write
  | :disclose
  | :spend
  | :delegate
  | :govern
  | :present
```

# `t`

```elixir
@type t() :: %Spectre.GAM.Row{
  attempt: boolean(),
  delegate: boolean(),
  disclose: boolean(),
  govern: boolean(),
  observe: boolean(),
  present: boolean(),
  read: boolean(),
  schema_version: 1,
  spend: boolean(),
  write: boolean()
}
```

# `canonical`

```elixir
@spec canonical(t()) :: map()
```

Returns the plain, string-keyed ledger representation.

# `digest`

```elixir
@spec digest(t()) :: String.t()
```

Returns the stable digest of a row.

# `dimensions`

```elixir
@spec dimensions(t()) :: [dimension()]
```

Returns enabled dimensions in stable vocabulary order.

# `from_canonical`

```elixir
@spec from_canonical(map()) :: {:ok, t()} | {:error, term()}
```

Restores a row from its canonical map.

# `known_dimensions`

```elixir
@spec known_dimensions() :: [dimension()]
```

Returns the fixed governed-dimension vocabulary.

# `new`

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

Builds and validates an effect row. Omitted dimensions are `false`.

# `subset?`

```elixir
@spec subset?(t() | map() | keyword(), t() | map() | keyword()) :: boolean()
```

Returns true when every enabled dimension in `row` is enabled by `ceiling`.

Both arguments may be structs, keyword lists or canonical maps. Malformed
rows fail closed and return `false`; unknown keys are never ignored.

# `validate`

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

Validates an effect row without changing it.

---

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