# `Tay.Worker`
[🔗](https://github.com/AndriiSydorenko1904/tay/blob/v1.6.1/lib/tay/worker.ex#L1)

The callback contract for a worker that accepts a `Tay.Job`.

Implement with `@behaviour Tay.Worker` and a `perform/1` callback.
`:ok` and `{:ok, result}` describe successful callback returns;
`{:error, reason}` describes an unsuccessful return. Returned values are
runtime terms, not an approved persisted representation.

`use Tay.Worker, key: "stable.key"` provides pure job builders. The configured
Engine maps that stable key to a trusted module and executes `perform/1` only
after a durable start Event. Worker return terms are not persisted; only a
bounded outcome diagnostic and final retry/discard decision are logged.

# `perform`

```elixir
@callback perform(Tay.Job.t()) :: :ok | {:ok, term()} | {:error, term()}
```

---

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