View Source Slipstream.Serializer behaviour (Slipstream v1.1.3)

A behaviour that serializes incoming and outgoing socket messages.

Summary

Callbacks

Decodes binary into Slipstream.Message struct.

Encodes Slipstream.Message structs to binary.

Callbacks

Link to this callback

decode!(binary, options)

View Source
@callback decode!(binary(), options :: Keyword.t()) :: Slipstream.Message.t()

Decodes binary into Slipstream.Message struct.

@callback encode!(Slipstream.Message.t(), options :: Keyword.t()) :: binary()

Encodes Slipstream.Message structs to binary.