Spectre.Turn.Handler.Reply (Spectre v0.3.0)

Copy Markdown View Source

Safe, typed reply returned by a Spectre.Turn.Handler.

The value intentionally contains no Spectre state, route, capability effect, or awaitable. Spectre remains authoritative for those fields when it builds the final Spectre.Result and, at the host boundary, Spectre.Turn.

Summary

Functions

Builds a typed turn-handler reply.

Types

t()

@type t() :: %Spectre.Turn.Handler.Reply{
  events: [term()],
  metadata: map(),
  reply_text: String.t()
}

Functions

new(reply_text, opts \\ [])

@spec new(
  String.t(),
  keyword()
) :: t()

Builds a typed turn-handler reply.