Byte sink for the BAM writer.
write/2 appends iodata. close/1 releases the sink. BAM.Sink.File
writes a local file. BAM.Sink.Memory keeps the bytes so a test can
inspect them without touching the filesystem.
Summary
Types
@type state() :: term()
Opaque handle owned by one sink implementation.
Callbacks
@callback close(state()) :: {:ok, state()} | {:error, BAM.Error.t()}
@callback write(state(), iodata()) :: {:ok, state()} | {:error, BAM.Error.t()}