Expand description
Loading a program’s data (docs/data-input.md).
A program’s manifest (Program::inputs) says what it reads. The host
opens each input through a Resolver, which decides what a path means
and whether it may be read at all. This module reads the bytes, within
InputLimits, and turns them into values of the declared types. The
engine never touches files: it gets the values as Inputs, which only
load makes, and checks they’re for the program it runs.
Structs§
- Input
Limits - Limits on loading data, for all of a program’s inputs together.
- Inputs
- What was read for a program: the value of each input, and where they
came from. Only
loadmakes these, and the engine checks that they’re for the program it runs. - Snapshots
- The bytes read so far, by identity. A load reads each identity once;
kept between loads, snapshots keep the data the same. The REPL, which
runs its whole session again after each input, keeps them until
:reload, so that earlier bindings don’t change under it. - Source
Info - A file, or standard input, that was read.
Traits§
- Resolver
- How a host gives a program its data. A program only names paths: what they refer to, and whether they may be read, is the host’s policy, and a program can’t widen it.