# `ToonEx.Btoon.Binary`
[🔗](https://github.com/ohhi-vn/toon_ex/blob/v1.6.0/lib/toon_ex/btoon/types.ex#L89)

Wraps a raw binary value so the encoder emits tag `0x08` (Binary) instead
of tag `0x07` (String). Plain Elixir binaries are always encoded as UTF-8
strings.

## Examples

    iex> Btoon.encode!(%{"blob" => Btoon.Binary.new(<<1, 2, 3>>)})
    <<66, 84, 79, 78, 1, 0, 0, 0, 10, 1, 0, 0, 0, 8, 3, 0, 0, 0, 1, 2, 3>>

# `t`

```elixir
@type t() :: %ToonEx.Btoon.Binary{data: binary()}
```

# `data`

```elixir
@spec data(t()) :: binary()
```

Unwraps the wrapped binary.

# `new`

```elixir
@spec new(binary()) :: t()
```

Wraps a binary.

---

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