# `Enact.Actor`
[🔗](https://github.com/svycal/enact/blob/v0.1.0/lib/enact/actor.ex#L1)

Answers `anonymous?/1` for any actor term.

Anonymity must be a pattern-matchable value, never an absence —
`actor: nil` always raises in the runner. The fallback impl returns
`false` for any term, so authenticated actors need no impl at all.

Two ways to represent an anonymous caller:

  * the bare `:anonymous` atom — zero-ceremony option for simple apps
  * a host-app impl for a scope struct (`%Scope{user: nil} → true`),
    enabling rich anonymous scopes carrying session id / IP for rate
    limiting — the idiomatic Phoenix 1.8 shape

An anonymous actor is only permitted by actions declaring
`anonymous?: true` in `config/0`; the runner rejects it with
`:forbidden` everywhere else, before any pipeline work.

# `t`

```elixir
@type t() :: term()
```

All the types that implement this protocol.

# `anonymous?`

```elixir
@spec anonymous?(t()) :: boolean()
```

---

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