# `MutagenEx.Pipeline.IoFacade`
[🔗](https://github.com/iautom8things/mutagen_ex/blob/v0.2.0/lib/mutagen_ex/pipeline/io_facade.ex#L1)

Behaviour for the `:io` slot of the `Mix.Tasks.Mutagen` dispatch
table.

Production default: `MutagenEx.Pipeline.DefaultIo`, which writes the
encoded document to stdout or `Config.json_path` and then halts the
BEAM with `exit_code` (via `System.halt/1`).

Tests swap a process-message capture so the test VM stays alive
past the call.

# `emit`

```elixir
@callback emit(
  iodata :: iodata(),
  exit_code :: non_neg_integer(),
  config :: MutagenEx.Config.t() | nil
) :: any()
```

Sink the final encoded document. The production default halts the
BEAM; tests pass a non-halting alternative.

---

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