Normandy.Components.BaseIOSchema protocol (normandy v0.6.2)

View Source

Protocol for schema serialization and representation.

Provides functions for converting schemas to various string formats including plain text, rich text, and JSON.

Summary

Types

t()

All the types that implement this protocol.

Functions

Converts the struct to a rich/formatted string representation

Converts the struct to a plain string representation

Returns the schema definition for the struct

Converts the struct to a JSON string

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

__rich__(struct)

@spec __rich__(struct()) :: String.t()

Converts the struct to a rich/formatted string representation

__str__(struct)

@spec __str__(struct()) :: String.t()

Converts the struct to a plain string representation

get_schema(struct)

@spec get_schema(struct()) :: term()

Returns the schema definition for the struct

to_json(struct)

@spec to_json(struct()) :: String.t() | list()

Converts the struct to a JSON string