1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Plugin factory: how `folk-builder`'s generated `main.rs` constructs each plugin.
//!
//! The convention is: every plugin crate exports
//!
//! ```rust,ignore
//! pub fn folk_plugin_factory() -> Box<dyn folk_api::PluginFactory> {
//! Box::new(MyPluginFactory)
//! }
//! ```
//!
//! The builder calls `crate_name::folk_plugin_factory()` for each plugin
//! and registers the result. There is no other naming convention; the
//! function name is fixed.
use Result;
use Value as JsonValue;
use cratePlugin;
/// Constructs a [`Plugin`] from runtime configuration.