OptionalParserSupervisor

Struct OptionalParserSupervisor 

Source
pub struct OptionalParserSupervisor { /* private fields */ }
Expand description

Synchronous owner of the one process-wide optional parser session.

Implementations§

Source§

impl OptionalParserSupervisor

Source

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.

Source

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.

Source

pub fn shutdown(&mut self) -> Result<(), ParserSupervisorError>

Close, drain, and reap the resident session when one exists.

§Errors

Returns a typed cleanup failure when the direct child or an owned I/O thread cannot be verified as terminated within the cleanup deadline.

Trait Implementations§

Source§

impl Drop for OptionalParserSupervisor

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.