pub struct PluginOutput {
pub ops: Vec<PluginOp>,
pub errors: Vec<PluginError>,
}Expand description
Output returned from a plugin.
The plugin serializes this struct via MessagePack and returns a pointer
to it from the process function.
Output is an ordered sequence of operations (PluginOp) — not a
replacement list of directives. The host materializes the resulting
directive list by walking the ops in order, preserving the original
source span / file_id for Keep and Modify ops so plugin-transformed
directives retain byte-precise source locations for error reporting.
Every input directive index must appear in EXACTLY ONE op across
Keep / Modify / Delete; the host validates this and emits a
plugin error if the invariant is violated.
Fields§
§ops: Vec<PluginOp>Ordered operations that describe the resulting directive list.
errors: Vec<PluginError>Errors generated by the plugin.
Implementations§
Source§impl PluginOutput
impl PluginOutput
Sourcepub fn passthrough(len: usize) -> Self
pub fn passthrough(len: usize) -> Self
Create an output that passes through every input directive unchanged.
len is the number of input directives.
Trait Implementations§
Source§impl Clone for PluginOutput
impl Clone for PluginOutput
Source§fn clone(&self) -> PluginOutput
fn clone(&self) -> PluginOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more