Macaw.Data.Derived.Output (macaw_data v0.5.3)

Copy Markdown View Source

A derived source's answer read as any source's (spec/02 §8.5): a Macaw.Data.Source over an engine's last good output at one path, made by Macaw.Data.Derived.Engine.source/3.

  • describe/2 answers the output schema, supports: [], no parameters, and viewer_independent as the owner declared it;
  • fetch/2 answers the last good output whole, or {:error, :loading} before the first. It honors nothing, so the runtime finishes it (spec/01 §2.4);
  • it does not push: its owner's engine is what changes it, and the owner tells readers (spec/01 §5).

So a derived source is another derived source's input and a slot's source alike, and the conformance kit holds it as it holds any source.

Summary

Types

t()

@type t() :: %Macaw.Data.Derived.Output{
  delivery: Macaw.Data.Delivery.t() | nil,
  schema: Macaw.Data.Schema.t(),
  viewer_independent: boolean()
}