pub struct LoadedPlugin {
pub manifest: MutationManifest,
pub additional_patterns: String,
/* private fields */
}Expand description
A loaded mutation plugin with live WASM instance
Contains the plugin metadata and a live WASM instance that can be used
to call execute_transform() for complex transformations.
Fields§
§manifest: MutationManifestPlugin manifest containing metadata
additional_patterns: StringAdditional pattern sources (may be empty)
Implementations§
Source§impl LoadedPlugin
impl LoadedPlugin
Sourcepub fn execute_transform(
&mut self,
matches: Vec<MatchResult>,
context: TransformContext,
) -> Result<Vec<TextEdit>, LoaderError>
pub fn execute_transform( &mut self, matches: Vec<MatchResult>, context: TransformContext, ) -> Result<Vec<TextEdit>, LoaderError>
Execute transform on matched nodes
This is only called when manifest.transform is TransformDef::WasmExecute.
For template-based transforms, the host should handle expansion directly.
§Fuel Limit
Each call is limited to 1 million instructions to prevent runaway execution.
Auto Trait Implementations§
impl Freeze for LoadedPlugin
impl !RefUnwindSafe for LoadedPlugin
impl Send for LoadedPlugin
impl !Sync for LoadedPlugin
impl Unpin for LoadedPlugin
impl UnsafeUnpin for LoadedPlugin
impl !UnwindSafe for LoadedPlugin
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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