pub struct WasmErrorParserFactory { /* private fields */ }Expand description
CM.6b: mints a WasmErrorParser per compilation pipe reader.
Holds everything spawn_error_parser needs, so a reader can ask for an
instance long after load. Component is Arc-backed, so cloning it per
run is a refcount bump, not a recompile — the expensive Cranelift work
happened once at load.
Why a factory at all: see
lattice_compilation::CompilationParserFactory. The short version is
that a Store cannot be shared across the two reader threads.
Implementations§
Source§impl WasmErrorParserFactory
impl WasmErrorParserFactory
Sourcepub fn new(
host: Arc<PluginHost>,
component: Component,
manifest: PluginManifest,
tier: TrustTier,
budget: PluginBudget,
plugin_id: u64,
) -> Self
pub fn new( host: Arc<PluginHost>, component: Component, manifest: PluginManifest, tier: TrustTier, budget: PluginBudget, plugin_id: u64, ) -> Self
Bundle a compiled error-parser component with what it takes to
instantiate one.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WasmErrorParserFactory
impl !UnwindSafe for WasmErrorParserFactory
impl Freeze for WasmErrorParserFactory
impl Send for WasmErrorParserFactory
impl Sync for WasmErrorParserFactory
impl Unpin for WasmErrorParserFactory
impl UnsafeUnpin for WasmErrorParserFactory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more