DASL.CAR.Encoder (dasl v0.1.0)

View Source

Encoder for DASL CAR binary streams. Spec: https://dasl.ing/car.html

Summary

Functions

Encodes a DASL.CAR struct into a CAR binary stream.

Types

block_error()

@type block_error() :: {:error, :block, atom()}

header_error()

@type header_error() :: {:error, :header, atom()}

Functions

encode(car, opts \\ [])

@spec encode(
  DASL.CAR.t(),
  keyword()
) :: {:ok, binary()} | header_error() | block_error()

Encodes a DASL.CAR struct into a CAR binary stream.

Accepts the same options as DASL.CAR.encode/2.