Kitt.Encoder.encode_struct

You're seeing just the function encode_struct, go back to Kitt.Encoder module for more information.
Link to this function

encode_struct(message, opts \\ [])

View Source

Specs

encode_struct(message(), [{:format, :hex | :binary}]) ::
  {:ok, binary()} | {:error, term()}

Takes a Kitt message struct and encodes it to a binary representation of the message.

By default the message is encoded to a hexadecimal representation but the optional keyword argument format: :hex | :binary can explicitly define the desired output format.

Resulting binary is wrapped in an :ok tuple, else an {:error, reason} is returned.