Artefact.Binding (Artefact v0.1.2)

Copy Markdown View Source

A declared equivalence between nodes across two artefacts.

Bindings are the basis for union — without at least one binding, two artefacts have no commons and cannot be combined.

Summary

Functions

Find bindings between two artefacts.

Types

t()

@type t() :: %Artefact.Binding{uuid_a: String.t(), uuid_b: String.t()}

Functions

find(a1, a2, opts \\ [])

Find bindings between two artefacts.

By default, nodes with the same uuid are automatically bound. Use inject: to declare equivalences between nodes with different uuids.

Returns {:ok, bindings} or {:error, :no_match} if no bindings found.

Options

  • inject: — list of {uuid_a, uuid_b} pairs declaring equivalences