pub struct ComposeSource { /* private fields */ }Expand description
A merged Compose project and the caller-owned context needed to import it safely.
Implementations§
Source§impl ComposeSource
impl ComposeSource
Sourcepub const fn with_interpolation_applied(self) -> Self
pub const fn with_interpolation_applied(self) -> Self
Records that the native merge consumed an interpolation overlay, including an empty one. Callers must set this whenever merging with an overlay: escaped dollars may have been decoded even when no substituted provider value carries sensitivity taint.
Sourcepub const fn interpolation_applied(&self) -> bool
pub const fn interpolation_applied(&self) -> bool
Returns the explicit native processing-stage evidence supplied by the caller.
Sourcepub fn with_deferred_options(self, options: QuadletDeferredOptions) -> Self
pub fn with_deferred_options(self, options: QuadletDeferredOptions) -> Self
Attaches explicit per-service deferred execution plans to uninterpolated input.
Callers must merge without an interpolation overlay. Explicitly recorded overlays are rejected; this option never authorizes a second evaluation stage.
Sourcepub const fn deferred_options(&self) -> &QuadletDeferredOptions
pub const fn deferred_options(&self) -> &QuadletDeferredOptions
Returns the explicit deferral policy.
Sourcepub fn new(
project: MergedProject,
fallback_application_name: Identifier,
) -> Result<Self, ModelError>
pub fn new( project: MergedProject, fallback_application_name: Identifier, ) -> Result<Self, ModelError>
Creates a source without guessing profiles or source filenames from ambient state.
Every Compose source initially receives the stable neutral identity
compose-source-<numeric-id>. Call Self::with_source_id to replace it with a caller-owned
path, URI, or other display identity. The project’s explicit top-level name wins when
present; the fallback is used when Compose project naming was supplied externally or
omitted. If the merge consumed any interpolation overlay, callers must additionally use
Self::with_interpolation_applied, even when the overlay was empty or only decoded escapes.
Processing stage is explicit caller context and is never inferred from provenance or taint.
§Errors
Returns ModelError if a generated fallback source identity violates the neutral-model
invariant. This cannot occur for the current compose-source-<u32> spelling, but keeping
construction fallible avoids a hidden panic if that policy changes.
Sourcepub fn with_source_id(self, compose: ComposeSourceId, neutral: SourceId) -> Self
pub fn with_source_id(self, compose: ComposeSourceId, neutral: SourceId) -> Self
Assigns a caller-owned neutral identity to one Compose source document.
Unknown Compose source IDs are retained in the map but cannot contribute provenance unless they also occur in the merged project.
Sourcepub fn with_profile_selection(self, selection: ProfileSelection) -> Self
pub fn with_profile_selection(self, selection: ProfileSelection) -> Self
Attaches the explicit selection produced by ComposeLens project processing.
Sourcepub fn with_native_diagnostics<'a>(
self,
stage: ComposeFindingStage,
diagnostics: impl IntoIterator<Item = &'a ComposeDiagnostic>,
) -> Self
pub fn with_native_diagnostics<'a>( self, stage: ComposeFindingStage, diagnostics: impl IntoIterator<Item = &'a ComposeDiagnostic>, ) -> Self
Retains native Compose diagnostics without terminal rendering or source contents.
Diagnostics should be attached at the stage where the caller obtained them. The adapter keeps native codes as provenance and maps them to BoxFerry-owned rules during import.
Sourcepub const fn project(&self) -> &MergedProject
pub const fn project(&self) -> &MergedProject
Returns the merged native project.
Sourcepub const fn fallback_application_name(&self) -> &Identifier
pub const fn fallback_application_name(&self) -> &Identifier
Returns the caller-selected fallback application name.
Sourcepub fn source_id(&self, compose: ComposeSourceId) -> Option<&SourceId>
pub fn source_id(&self, compose: ComposeSourceId) -> Option<&SourceId>
Resolves a Compose source identity into its neutral-model identity.
Sourcepub const fn profile_selection(&self) -> Option<&ProfileSelection>
pub const fn profile_selection(&self) -> Option<&ProfileSelection>
Returns the explicit profile selection, when one was supplied.
Sourcepub fn native_findings(&self) -> &[NativeFinding]
pub fn native_findings(&self) -> &[NativeFinding]
Returns retained native Compose findings in processing order.