Runic.Workflow.Fact (Runic v0.1.0-alpha.10)

Copy Markdown View Source

Summary

Functions

Constructs a Fact and its payload, content, and occurrence identities.

Types

hash()

@type hash() :: Runic.Identity.t() | integer() | binary()

t()

@type t() :: %Runic.Workflow.Fact{
  ancestry: {hash(), hash()} | nil,
  causal_ancestry: Runic.Workflow.FactAncestry.t() | nil,
  content_digest: Runic.Identity.t() | nil,
  hash: hash(),
  id: Runic.Identity.t() | nil,
  meta: map(),
  payload_digest: Runic.Identity.t() | nil,
  value: term()
}

Functions

new(params)

Constructs a Fact and its payload, content, and occurrence identities.

Supply a :fact_occurrence Identity in :id to distinguish equal inputs. The compatibility :hash field mirrors that ID; supplying both fields with different identities raises. Legacy integer or binary hashes remain accepted when no :id is supplied.