Dsxir.Signature.Runtime (dsxir v0.1.0)

Copy Markdown

Stable introspection surface for signature modules. Callers depend on this module rather than on the Spark Info generator output.

Summary

Functions

Return all declared fields for the signature, in source order.

Return the input fields for the signature.

Return the user-supplied instruction string, or nil if none was set.

Return the output fields for the signature.

Look up the Zoi schema for the field named name.

Types

signature()

@type signature() :: module() | Dsxir.Signature.Compiled.t()

Functions

fields(signature_module)

@spec fields(signature()) :: [Dsxir.Signature.Field.t()]

Return all declared fields for the signature, in source order.

inputs(signature)

@spec inputs(signature()) :: [Dsxir.Signature.Field.t()]

Return the input fields for the signature.

instruction(signature_module)

@spec instruction(signature()) :: nil | String.t()

Return the user-supplied instruction string, or nil if none was set.

outputs(signature)

@spec outputs(signature()) :: [Dsxir.Signature.Field.t()]

Return the output fields for the signature.

zoi_for(signature, name)

@spec zoi_for(signature(), atom()) :: {:ok, Zoi.schema()} | :error

Look up the Zoi schema for the field named name.