pbuf v0.1.2 Pbuf.Encoder

Link to this section Summary

Link to this section Functions

Link to this function

enum_field(mod, val, prefix)
enum_field(module(), any(), binary()) :: iodata()

Link to this function

field(atom, n)
field(atom(), any()) :: iodata()

Encodes a value

Link to this function

field(arg1, val, prefix)
field(atom(), any(), binary()) :: iodata()

Encodes a field. This means we encode the prefix + the value. We also do type checking and, omit any nil / default values.

Link to this function

map_field(kprefix, ktype, vprefix, vtype, map, prefix)
map_field(binary(), atom(), binary(), atom(), any(), binary()) :: iodata()

Link to this function

oneof_field(choice, atom, fun)

Link to this function

oneof_field(choice, value, arg3, fun)

Link to this function

prefix(tag, type)
prefix(pos_integer(), atom()) :: binary()

Generates a field prefix. This is the tag number + wire type

Link to this function

repeated_enum_field(mod, vals, prefix)
repeated_enum_field(module(), any(), binary()) :: iodata()

Link to this function

repeated_field(type, enum, prefix)
repeated_field(atom(), any(), binary()) :: iodata()

Link to this function

repeated_unpacked_field(type, enum, prefix)

Link to this function

varint(n)
varint(integer()) :: iodata()

Link to this function

wire_type(arg1)
wire_type(atom()) :: integer()

Link to this function

zigzag(val)
zigzag(integer()) :: integer()