pub struct Plugin { /* private fields */ }Expand description
Loaded plugin component. Holds the compiled component + cached info().
Each invocation builds a fresh Store with its own resource budget.
Implementations§
Source§impl Plugin
impl Plugin
pub fn info(&self) -> &PluginInfo
pub fn config_schema(&self) -> &str
pub fn kind(&self) -> PluginKind
Sourcepub fn load_transformer(
engine: &Engine,
bytes: &[u8],
) -> Result<Self, LoadError>
pub fn load_transformer( engine: &Engine, bytes: &[u8], ) -> Result<Self, LoadError>
Load a transformer plugin from raw component bytes.
Sourcepub fn load_generator(engine: &Engine, bytes: &[u8]) -> Result<Self, LoadError>
pub fn load_generator(engine: &Engine, bytes: &[u8]) -> Result<Self, LoadError>
Load a generator plugin from raw component bytes.
Sourcepub fn transform(
&self,
spec: Ir,
config: &str,
limits: Limits,
) -> Result<TransformOutput, StageError>
pub fn transform( &self, spec: Ir, config: &str, limits: Limits, ) -> Result<TransformOutput, StageError>
Run a transformer.
Sourcepub fn generate(
&self,
spec: Ir,
config: &str,
limits: Limits,
) -> Result<GenerationOutput, StageError>
pub fn generate( &self, spec: Ir, config: &str, limits: Limits, ) -> Result<GenerationOutput, StageError>
Run a generator.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Plugin
impl !RefUnwindSafe for Plugin
impl Send for Plugin
impl Sync for Plugin
impl Unpin for Plugin
impl UnsafeUnpin for Plugin
impl !UnwindSafe for Plugin
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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