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) -> PluginOutput
pub fn passthrough(len: usize) -> PluginOutput
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 moreSource§impl Debug for PluginOutput
impl Debug for PluginOutput
Source§impl<'de> Deserialize<'de> for PluginOutput
impl<'de> Deserialize<'de> for PluginOutput
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluginOutput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluginOutput, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for PluginOutput
impl Serialize for PluginOutput
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for PluginOutput
impl RefUnwindSafe for PluginOutput
impl Send for PluginOutput
impl Sync for PluginOutput
impl Unpin for PluginOutput
impl UnsafeUnpin for PluginOutput
impl UnwindSafe for PluginOutput
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.