pub struct OptionalParserSupervisor { /* private fields */ }Expand description
Synchronous owner of the one process-wide optional parser session.
Implementations§
Source§impl OptionalParserSupervisor
impl OptionalParserSupervisor
Sourcepub fn open(pack_root: impl AsRef<Path>) -> Result<Self, ParserSupervisorError>
pub fn open(pack_root: impl AsRef<Path>) -> Result<Self, ParserSupervisorError>
Open and verify one installed immutable optional-parser artifact.
This performs no process creation. Unsupported hosts fail before artifact acquisition by higher layers, worker launch, or source transfer.
§Errors
Returns a typed unsupported-host, path, manifest, payload, or digest error.
Sourcepub fn parse(
&mut self,
language_id: &str,
source: &[u8],
limits: ParserRequestLimits,
absolute_deadline: Instant,
no_progress_timeout: Duration,
cancellation: &IndexCancellation,
) -> Result<ParserCompletionEvidence, ParserSupervisorError>
pub fn parse( &mut self, language_id: &str, source: &[u8], limits: ParserRequestLimits, absolute_deadline: Instant, no_progress_timeout: Duration, cancellation: &IndexCancellation, ) -> Result<ParserCompletionEvidence, ParserSupervisorError>
Parse bounded raw source through one grammar-affined contained worker.
absolute_deadline is never extended by progress. One pre-READY epoch
covers currentness, reload, sealing, admission, and opening. A newly
validated READY or later identity-validated advancing progress resets
no_progress_timeout.
cancellation is polled while waiting for admission, writes, and output.
§Errors
Returns a typed artifact, grammar, containment, protocol, worker, cancellation, timeout, I/O, or mandatory cleanup failure. Any failed operation destroys the resident session before returning.