# `Bandera.Actor`

Identifies an actor (e.g. a user) for actor and percentage_of_actors gates.
The id must be a binary and stable for a given actor across a flag's lifetime.

Implementations ship for binaries, integers, and maps with an `:id` key; define
the protocol for your own struct to control how it is identified.

# `t`

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

All the types that implement this protocol.

# `id`

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

Returns the stable string id for `actor`.

## Examples

    iex> Bandera.Actor.id("user-1")
    "user-1"

    iex> Bandera.Actor.id(42)
    "42"

    iex> Bandera.Actor.id(%{id: 7})
    "7"

---

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