PtcRunner.Lisp.Prelude.AttachContext (PtcRunner v0.14.0)

Copy Markdown View Source

Host tool grants used to validate a prelude's requires at attach time.

Tool names are strings, matching PtcRunner.Lisp.run/2 execution lookup.

Summary

Functions

True when the granted tools map contains a typed tool named name.

Builds an attach context from a map or tuple-list :tools option.

Types

t()

@type t() :: %PtcRunner.Lisp.Prelude.AttachContext{
  tools: %{optional(String.t()) => term()}
}

Functions

grants_tool?(attach_context, name)

@spec grants_tool?(t(), String.t()) :: boolean()

True when the granted tools map contains a typed tool named name.

new(opts \\ [])

@spec new(keyword()) :: t()

Builds an attach context from a map or tuple-list :tools option.