Skip to main content

Crate stack_engine

Crate stack_engine 

Source
Expand description

Pure operation facade and output contract for Stack diagrams.

The facade accepts source bytes and a validated, versioned theme catalog. It never reads the filesystem, network, process environment, clock, locale, or host font APIs. Invalid user source is returned as ordered diagnostics in a successful operation result; OperationalError is reserved for failures in supplied execution inputs or violated internal pipeline invariants.

use stack_engine::Engine;

let engine = Engine::bundled();
let output = engine.check(b"stack 1.0 diagram \"API\" { node api \"API\" }")?;
assert!(output.diagnostics.is_empty());
assert_eq!(output.metadata.language_version.map(|version| version.major), Some(1));

Structs§

CheckOutput
Result of the check operation.
CompletionItem
One literal, protocol-neutral source completion.
CompletionOutput
Completion result for one caller-owned document version.
Diagnostic
Engine-owned portable diagnostic shared by native and future WASM outputs.
Engine
Pure engine facade backed by one validated catalog and revision.
EngineMetadata
Version metadata attached to every operation output.
FormatOutput
Result of the format operation.
Hover
Plain-text semantic information for one source token.
HoverOutput
Hover result for one caller-owned document version.
LanguageVersion
Authored Stack language version when decoding and syntax parsing succeed.
ProviderAsset
One caller-owned processed SVG addressed by its provider-manifest path.
ProviderNotice
Notice and provenance for one provider pack used by a rendered artifact.
ProviderNoticeIcon
One provider icon listed in a rendered-artifact notice.
ProviderNoticeSource
One audited archive listed in a rendered-artifact notice.
ProviderPack
One validated, content-addressed provider pack held entirely in memory.
RelatedInformation
Additional source context related to a diagnostic.
RenderOutput
Result of the render operation.
SourcePosition
One-based line and column with a zero-based UTF-8 byte offset.
SourceRange
End-exclusive source range.
TextEdit
A source replacement interpreted against the unchanged input snapshot.

Enums§

CompletionKind
Semantic category of one completion item.
HoverKind
Semantic category described by hover information.
OperationalError
Failure in execution inputs or internal pipeline invariants, not in Stack source.
Severity
Severity of one portable diagnostic.

Constants§

ENGINE_VERSION
Version of the Rust engine facade.
LANGUAGE_INTELLIGENCE_SCHEMA_VERSION
Portable language-intelligence schema version implemented by the pinned compiler.

Type Aliases§

OperationResult
Result channel for failures outside user-authored Stack source.