Skip to main content

Module output_adapter

Module output_adapter 

Source
Expand description

Output adapter trait for handling print() results.

Different execution modes (script vs REPL vs notebook) control how print() output is surfaced.

Per ADR-006 §2.7.4 (output adapter ruling), PrintResult and [PrintSpan] live in shape-runtime (see crate::print_result) and OutputAdapter::print returns a KindedSlot — the GENERIC_CARRIER single-value shape (§2.7.1.2). Adapters that have no sensible heap value to return (script mode) return KindedSlot::none(); adapters that surface the structured output (REPL) attach the PrintResult to a typed-object heap value before returning. In Phase 1.B the from_print_result heap-construction is deferred — REPL mode currently returns none() and a follow-up wires PrintResult through a typed schema.

Structs§

MockAdapter
Mock adapter for testing — captures output without printing.
ReplAdapter
REPL output adapter — preserves spans for reformatting.
SharedCaptureAdapter
Shared capture adapter for host integrations (server/notebook).
StdoutAdapter
Standard output adapter — prints to stdout and discards spans.

Traits§

OutputAdapter
Trait for handling print() output.