# `Slither.Item`
[🔗](https://github.com/nshkrdotcom/slither/blob/v0.1.0/lib/slither/item.ex#L1)

Work envelope carrying a payload through Slither pipelines.

Every item has a stable ID for ordering and error attribution,
stage-local metadata for tracing, and a route tag for dispatch
without coupling payload types.

# `id`

```elixir
@type id() :: pos_integer() | binary()
```

# `t`

```elixir
@type t() :: %Slither.Item{id: id(), meta: map(), payload: term(), route: atom()}
```

# `put_meta`

```elixir
@spec put_meta(t(), map()) :: t()
```

Merge metadata into an item's meta map.

# `update_payload`

```elixir
@spec update_payload(t(), term()) :: t()
```

Update the payload of an item, preserving ID and metadata.

# `wrap`

```elixir
@spec wrap(term()) :: t()
```

Wrap a raw payload into an Item with an auto-generated ID.

# `wrap_many`

```elixir
@spec wrap_many(Enumerable.t()) :: [t()]
```

Wrap a list of payloads into Items with sequential IDs.

---

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