Search documentation of Finitomata

# View Source Finitomata.Persistency.Persistable protocol (Finitomata v0.21.2)

The protocol to be implemented for custom data to be used in pair with `Finitomata.Persistency.Protocol` persistency adapter.

For that combination, one should implement the protocol for that particular struct and specify `Finitomata.Persistency.Protocol` as a `persistency` in a call to `use Finitomata`.

    use Finitomata, …, persistency: Finitomata.Persistency.Protocol

# Summary

## Types

t()

All the types that implement this protocol.

## Functions

load(data)

Loads the entity from some external storage

store(data, info)

Persists the transitioned entity to some external storage

store_error(data, reason, info)

Persists the error happened while an attempt to transition the entity

# Types

Link to this type

# t()

View Source

    @type t() :: term()

All the types that implement this protocol.

# Functions

Link to this function

# load(data)

View Source

Loads the entity from some external storage

Link to this function

# store(data, info)

View Source

Persists the transitioned entity to some external storage

Link to this function

# store_error(data, reason, info)

View Source

Persists the error happened while an attempt to transition the entity