pub trait Plugin: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn kind(&self) -> Kind;
fn prepare(
&self,
config: &BTreeMap<String, Value>,
) -> Result<Box<dyn Instance>, Error>;
// Provided methods
fn spec(&self) -> Spec { ... }
fn params(&self) -> Vec<ParamSpec> { ... }
}Expand description
プラグイン(設定から Instance を作る)
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".