pub struct Specification(pub Vec<Definition>);Tuple Fields§
§0: Vec<Definition>Implementations§
Source§impl Specification
impl Specification
pub fn from_typed_ast_with_properties( value: Specification, properties: ParserProperties, ) -> Self
pub fn from_typed_ast_with_properties_and_path( value: Specification, properties: ParserProperties, path: impl AsRef<Path>, ) -> ParserResult<Self>
Sourcepub fn from_typed_ast_with_resolver(
value: Specification,
properties: ParserProperties,
path: impl AsRef<Path>,
resolver: &mut dyn IncludeResolver,
) -> ParserResult<Self>
pub fn from_typed_ast_with_resolver( value: Specification, properties: ParserProperties, path: impl AsRef<Path>, resolver: &mut dyn IncludeResolver, ) -> ParserResult<Self>
Lowers an unprojected typed AST using the caller’s include resolver.
Preserves dependency mounts when a versioned include is resolved during lowering, after the outer source has already been parsed.
pub fn from_typed_ast_with_path( value: Specification, path: impl AsRef<Path>, ) -> ParserResult<Self>
Sourcepub fn project_typed_ast_versions(
value: Specification,
properties: ParserProperties,
path: impl AsRef<Path>,
) -> ParserResult<Vec<VersionedProjection>>
pub fn project_typed_ast_versions( value: Specification, properties: ParserProperties, path: impl AsRef<Path>, ) -> ParserResult<Vec<VersionedProjection>>
Lowers a typed AST and returns one HIR projection per requested version.
Unversioned specifications produce exactly one projection without a
version. Versioned specifications produce one merged projection holding
one module per selected version (merged layout, the default), or one
projection per selected version (per_version layout).
Sourcepub fn project_typed_ast_versions_with_resolver(
value: Specification,
properties: ParserProperties,
path: impl AsRef<Path>,
resolver: &mut dyn IncludeResolver,
) -> ParserResult<Vec<VersionedProjection>>
pub fn project_typed_ast_versions_with_resolver( value: Specification, properties: ParserProperties, path: impl AsRef<Path>, resolver: &mut dyn IncludeResolver, ) -> ParserResult<Vec<VersionedProjection>>
Lowers a typed AST with resolver for the includes it names.
Versioned includes need the resolver that resolved the unit’s own includes, so a caller that has one passes it here instead of letting the filesystem resolver stand in.
§Errors
Returns an error when a versioned include cannot be resolved, read, projected, or spliced.
Sourcepub fn project_typed_ast_with_properties_and_path(
value: Specification,
properties: ParserProperties,
path: impl AsRef<Path>,
) -> ParserResult<ProjectedHir>
pub fn project_typed_ast_with_properties_and_path( value: Specification, properties: ParserProperties, path: impl AsRef<Path>, ) -> ParserResult<ProjectedHir>
Lowers a typed AST and projects the first request of the merged layout.
Callers that need per-version output use Self::project_typed_ast_versions.