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

Canonical information constraint with an explicit owner.

Spectre.GAM does not interpret `value` or impose a label taxonomy. The stable
reference binds that portable value to the principal which may authorize its
removal.

# `t`

```elixir
@type t() :: %Spectre.GAM.Label{
  owner_ref: String.t(),
  ref: String.t(),
  schema_version: 1,
  value: term()
}
```

# `canonical`

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

Returns the plain, string-keyed representation.

# `content_ref`

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

Returns the reference derived from owner and value.

# `digest`

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

Returns the stable digest of the complete label.

# `from_canonical`

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

Restores a label and verifies its content reference.

# `new`

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

Builds a canonical, content-addressed label.

# `normalize_many`

```elixir
@spec normalize_many(term()) :: {:ok, [t()]} | {:error, term()}
```

Normalizes, de-duplicates and orders labels by stable reference.

---

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