Behaviour for sink destinations that receive rendered iodata and events.
Summary
Types
Callbacks
@callback close(state()) :: :ok | {:error, ASM.Error.t() | term()}
@callback flush(state()) :: {:ok, state()} | {:error, ASM.Error.t() | term()} | {:error, ASM.Error.t() | term(), state()}
@callback init(opts()) :: {:ok, state()} | {:error, ASM.Error.t() | term()}
@callback write(iodata(), state()) :: {:ok, state()} | {:error, ASM.Error.t() | term()} | {:error, ASM.Error.t() | term(), state()}
@callback write_event(ASM.Event.t(), iodata(), state()) :: {:ok, state()} | {:error, ASM.Error.t() | term()} | {:error, ASM.Error.t() | term(), state()}