pub trait ArcPlugin:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &'static str;
fn register(&self, builder: ArcAppBuilder) -> ArcAppBuilder;
// Provided method
fn setup<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 PluginSetupContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Compile-time extension package registered through ArcAppBuilder.
Plugins remain ordinary Cargo dependencies: registration is explicit, typed, and visible in application code. Implementations may add routes, aggregates, projectors, and other builder-supported capabilities.
Required Methods§
Sourcefn register(&self, builder: ArcAppBuilder) -> ArcAppBuilder
fn register(&self, builder: ArcAppBuilder) -> ArcAppBuilder
Contribute this package’s capabilities to the application builder.
Provided Methods§
Sourcefn setup<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 PluginSetupContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn setup<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_context: &'life1 PluginSetupContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run package-owned migrations and idempotent setup work.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".