Msgpax v2.3.0 Msgpax.Bin View Source

A struct to represent the MessagePack Binary type.

Elixir binaries are serialized and deserialized as MessagePack strings: Msgpax.Bin is used when you want to enforce the serialization of a binary into the Binary MessagePack type. Deserialization functions (such as Msgpax.unpack/2) provide an option to deserialize Binary terms (which are deserialized to Elixir binaries by default) to Msgpax.Bin structs.

Link to this section Summary

Functions

Creates a new Msgpax.Bin struct from the given binary.

Link to this section Types

Link to this type

t() View Source
t() :: %Msgpax.Bin{data: binary()}

Link to this section Functions

Creates a new Msgpax.Bin struct from the given binary.

Examples

iex> Msgpax.Bin.new("foo")
#Msgpax.Bin<"foo">