Skip to main content

Module inject

Module inject 

Source
Expand description

The build injector: a hook a vista factory runs on every table it builds from a spec — the root, each reference target and each base: table — after the table is built and before it is wrapped. It may add conditions and register hooks, or fail the build.

Each backend’s spec builder threads a BuildEnv through its builds and ends with BuildEnv::inject; Table::with_spec_references hands each reference target a fresh environment of kind BuildKind::Reference.

Structs§

BuildEnv
What a spec build carries besides the spec and the data source: the resolver for references and base:, the injector, the trail of keys being built, and the kind of this build.
BuildTrail
The spec keys being built, outermost first. Nested builds (an injector building a parent, a base: chain) extend it; re-entering a key is a cycle.
InjectCx
What an injector receives besides the table: the spec key being built, why, and a builder for other tables of the same backend.

Enums§

BuildKind
Why a table is being built.

Type Aliases§

SpecTableBuilder
Builds a table from spec S over data source T, carrying the build environment into nested builds.
TableInjector
A build injector. Typed per backend, since each backend’s table is.