# `Puck.Content.Wrappable`
[🔗](https://github.com/bradleygolden/puck/blob/v0.2.25/lib/puck/content/wrappable.ex#L1)

Protocol for converting content to `Puck.Content.Part` structs.

Built-in implementations:
- Strings become text parts
- Maps/structs are JSON-encoded
- Parts pass through unchanged

# `t`

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

All the types that implement this protocol.

# `wrap`

Converts content to a list of Content.Part structs.

## Examples

    iex> Puck.Content.Wrappable.wrap("Hello")
    [%Puck.Content.Part{type: :text, text: "Hello"}]

    iex> Puck.Content.Wrappable.wrap(%{result: 42})
    [%Puck.Content.Part{type: :text, text: ~s({"result":42})}]

---

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