Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
    // Required method
    fn build(
        &self,
        ctx: &AppContext,
    ) -> impl Future<Output = Result<(), StdError>> + Send;

    // Provided method
    fn dependencies(&self) -> Dependencies { ... }
}
Expand description

Trait for modular components that participate in the build process.

Plugins receive an AppContext reference and can register components, daemons, or other plugins.

Required Methods§

Source

fn build( &self, ctx: &AppContext, ) -> impl Future<Output = Result<(), StdError>> + Send

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§