pub trait CompilationParserFactory:
Send
+ Sync
+ Debug {
// Required methods
fn plugin_id(&self) -> u64;
fn create(&self) -> Option<Box<dyn CompilationParser>>;
}Expand description
Mints a fresh CompilationParser for one pipe reader.
Implemented by lattice-plugin-host over a compiled error-parser
component; the compilation crate never learns what a plugin is.
Required Methods§
Sourcefn plugin_id(&self) -> u64
fn plugin_id(&self) -> u64
The host-issued plugin id that contributed this factory.
Teardown removes by it — see
CompilationParserFactories::unregister_plugin.
Sourcefn create(&self) -> Option<Box<dyn CompilationParser>>
fn create(&self) -> Option<Box<dyn CompilationParser>>
Mint a parser for one reader.
None means instantiation failed. The implementor logs it; the
run continues with whatever parsers it did get, because one bad
plugin must cost its own entries and not the build (the same
contract WasmErrorParser’s trap-poisoning follows).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".