# `Spectre.Stack.Ref`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/stack/ref.ex#L1)

Logical reference to one capability or runtime resource in a resolved Stack.

A Ref carries version and definition fences, but never the process, client,
connection, or secret used to implement the capability.

# `kind`

```elixir
@type kind() :: :package | :contract | :service | :operation | :action | :resource
```

# `t`

```elixir
@type t() :: %Spectre.Stack.Ref{
  id: term(),
  installation: term(),
  installation_digest: String.t(),
  kind: kind(),
  package: term(),
  stack: module(),
  stack_digest: String.t(),
  version: String.t()
}
```

# `key`

```elixir
@spec key(t()) :: tuple()
```

Returns the stable key used to fence a runtime child binding.

# `valid?`

```elixir
@spec valid?(term()) :: boolean()
```

Validates that a Ref contains only immutable logical data.

---

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