VCF.Writer (VCF v1.0.0)

View Source

Canonical VCF encoding and output destinations.

Summary

Functions

Encodes a document or stream to a canonical VCF binary.

Encodes a header and record enumerable to a canonical VCF binary.

Encodes and writes to a path or caller-owned I/O device.

Functions

encode(data, options \\ [])

@spec encode(
  VCF.Document.t() | VCF.Stream.t(),
  keyword()
) :: {:ok, binary()} | {:error, VCF.Error.t() | [VCF.Error.t()]}

Encodes a document or stream to a canonical VCF binary.

encode(header, records, options)

@spec encode(VCF.Header.t(), Enumerable.t(), keyword()) ::
  {:ok, binary()} | {:error, VCF.Error.t() | [VCF.Error.t()]}

Encodes a header and record enumerable to a canonical VCF binary.

write(destination, data, options \\ [])

@spec write(term(), VCF.Document.t() | VCF.Stream.t(), keyword()) ::
  :ok | {:error, VCF.Error.t() | [VCF.Error.t()]}

Encodes and writes to a path or caller-owned I/O device.

write(destination, header, records, options)

@spec write(term(), VCF.Header.t(), Enumerable.t(), keyword()) ::
  :ok | {:error, VCF.Error.t() | [VCF.Error.t()]}