Expand description
Where program output and error reports go.
By default they go to the process’s stdout and stderr. A host that embeds the runtime can redirect both into a per-thread buffer instead, run some candela code, and read the buffer back. Redirection is a runtime setting, so a single build serves both the command-line toolchain and an embedding host. wasm builds always redirect, since there are no process streams to write to.
A stream that refuses a write costs the text, never the run: write through
[out!] and [outln!] rather than unwrapping.
Enums§
- Output
Handle - A writer that resolves to a process stream or to the capture buffer, whichever is in effect when it is created.
Constants§
Functions§
- is_
capturing - Whether output on this thread is redirected into
CAPTURED_OUTPUT. - Appends to this thread’s capture buffer, whether or not redirection is on.
- set_
capturing - Starts or stops redirecting output on this thread, and returns the setting that was in effect, so a caller can put it back.
- stderr
- The sink for error reports.
- stdout
- The sink for program output (
printand friends).