Protox.Encode.encode

You're seeing just the function encode, go back to Protox.Encode module for more information.

Specs

encode(struct()) :: {:ok, iodata()} | {:error, any()}

Encode a protobuf message into IO data.

Example

msg = %Fiz.Foo{a: 3, b: %{1 => %Fiz.Baz{}}}
{:ok, iodata} = Protox.Encode.encode(msg)