#[non_exhaustive]pub struct Workspace {
pub root: Arc<Path>,
pub components: Vec<Component>,
pub modules: Vec<Module>,
pub environments: Vec<Environment>,
pub diagnostics: Vec<Diagnostic>,
pub edges: Vec<Edge>,
}Expand description
The fully-parsed workspace, ready for export.
Per 10-data-model.md § 2.1, the workspace owns:
- the set of components (apply-able roots),
- the set of modules referenced from those components,
- the discovered environments, and
- any non-fatal diagnostics produced anywhere in the pipeline.
Construct via [WorkspaceBuilder].
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.root: Arc<Path>Absolute canonical path of the workspace root.
components: Vec<Component>Components in path-ascending order (deterministic).
modules: Vec<Module>Referenced modules (whether the body was walked or not).
environments: Vec<Environment>Discovered environments.
diagnostics: Vec<Diagnostic>Workspace-wide non-fatal diagnostics. Per-component diagnostics
(e.g. from the Terragrunt resolver) hang off their owning
TerragruntConfig.diagnostics instead.
edges: Vec<Edge>Dependency edges populated by the graph phase (Phase 8 / M5). The
list is sorted by (from, to, kind) for deterministic Parquet
output (see 15-resource-graph.md § 4).
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn builder() -> WorkspaceBuilder<((), (), (), (), (), ())>
pub fn builder() -> WorkspaceBuilder<((), (), (), (), (), ())>
Create a builder for building Workspace.
On the builder, call .root(...), .components(...)(optional), .modules(...)(optional), .environments(...)(optional), .diagnostics(...)(optional), .edges(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Workspace.