Combo.SafeHTML.Safe protocol (combo v0.8.0)

View Source

Defines the HTML safe protocol.

In order to promote HTML safety, when converting data types to strings, Combo doesn't use Kernel.to_string/1. Instead, it uses this protocol which must be implemented by data structures and guarantee that an HTML safe representation is returned.

Furthermore, this protocol relies on iodata, which provides better performance when sending or streaming data to the client.

Summary

Types

t()

All the types that implement this protocol.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

to_iodata(data)