pub struct Engine<'catalog> { /* private fields */ }Expand description
Pure engine facade backed by one validated catalog and revision.
Implementations§
Source§impl Engine<'_>
impl Engine<'_>
Sourcepub fn completion(
&self,
source: &str,
document_version: u64,
position: SourcePosition,
) -> OperationResult<CompletionOutput>
pub fn completion( &self, source: &str, document_version: u64, position: SourcePosition, ) -> OperationResult<CompletionOutput>
Computes context-aware completion from one complete UTF-8 source snapshot.
The response echoes document_version so a host can discard stale work.
Core and caller-owned provider icons come from the same validated catalogs
used by check and render operations.
Sourcepub fn hover(
&self,
source: &str,
document_version: u64,
position: SourcePosition,
) -> OperationResult<HoverOutput>
pub fn hover( &self, source: &str, document_version: u64, position: SourcePosition, ) -> OperationResult<HoverOutput>
Resolves plain-text semantic hover for one complete UTF-8 source snapshot.
The response echoes document_version so a host can discard stale work.
Source§impl<'catalog> Engine<'catalog>
impl<'catalog> Engine<'catalog>
Sourcepub fn with_provider_packs(
provider_packs: &'catalog [ProviderPack],
) -> OperationResult<Self>
pub fn with_provider_packs( provider_packs: &'catalog [ProviderPack], ) -> OperationResult<Self>
Creates an engine backed by the bundled catalog and validated provider packs.
Provider assets remain caller-owned in-memory data. The engine performs no discovery, file access, download, upload, caching, or terms decision.
Sourcepub fn with_catalog(
catalog: &'catalog Catalog,
catalog_revision: &'catalog str,
) -> OperationResult<Self>
pub fn with_catalog( catalog: &'catalog Catalog, catalog_revision: &'catalog str, ) -> OperationResult<Self>
Creates an engine from a previously validated catalog and its content revision.
The catalog document must already have passed the public stack-theme
schema and asset validator. This constructor checks the fallback records
needed by every engine operation and rejects invalid execution input as an
operational error rather than a user-source diagnostic.
Sourcepub fn with_catalog_and_provider_packs(
catalog: &'catalog Catalog,
catalog_revision: &'catalog str,
provider_packs: &'catalog [ProviderPack],
) -> OperationResult<Self>
pub fn with_catalog_and_provider_packs( catalog: &'catalog Catalog, catalog_revision: &'catalog str, provider_packs: &'catalog [ProviderPack], ) -> OperationResult<Self>
Creates an engine from a validated catalog and validated provider packs.
Provider namespaces must be unique. Provider icons cannot replace core
catalog identifiers because ProviderPack::new requires namespaced IDs.
Sourcepub fn format(&self, source: &[u8]) -> OperationResult<FormatOutput>
pub fn format(&self, source: &[u8]) -> OperationResult<FormatOutput>
Formats source while preserving compiler diagnostics in authored order.
Sourcepub fn check(&self, source: &[u8]) -> OperationResult<CheckOutput>
pub fn check(&self, source: &[u8]) -> OperationResult<CheckOutput>
Runs compiler, theme, layout, and routing validation without producing SVG.
Sourcepub fn render(&self, source: &[u8]) -> OperationResult<RenderOutput>
pub fn render(&self, source: &[u8]) -> OperationResult<RenderOutput>
Produces a deterministic standalone SVG from valid Stack source.
Invalid source returns a normal RenderOutput with ordered diagnostics
and no SVG. Resource and layout warnings preserve a fallback SVG, while
invalid catalog or intermediate pipeline state uses OperationalError.