pub trait RuntimePlugin:
Send
+ Sync
+ 'static {
// Required method
fn register(&self, r: &mut Registrar, cx: &InitCx) -> Result<(), Error>;
// Provided method
fn shutdown(&self) { ... }
}Expand description
What a runtime plugin does.
One instance serves the whole process and register
takes &self, so a plugin holding mutable state brings its own lock (the
Send + Sync bound is what makes that explicit).