GitHub

API reference for writer.

Writes the protobuf wire format (Effect's protobuf/ProtobufWriter).

A ProtobufWriter appends values and returns itself, so writes chain: w.tag(1, WireType.Len).string("a"). A nested message is written between fork and join, which fills in its length. finish returns the bytes and starts the writer over.

Numbers follow JavaScript's conversions, as Effect's do: a 32-bit method wraps its argument to 32 bits (a float is truncated, NaN and infinities are 0), and a 64-bit method takes an int, a float (truncated) or a decimal str, wrapped to 64 bits.

Re-exports

Classes

Functions

make

make() -> ProtobufWriter

Returns ProtobufWriter

def make() -> ProtobufWriter:
    return ProtobufWriter()