Trait routee_compass::app::compass::config::builders::InputPluginBuilder
source · pub trait InputPluginBuilder {
// Required method
fn build(
&self,
parameters: &Value
) -> Result<Arc<dyn InputPlugin>, CompassConfigurationError>;
}
Expand description
A InputPluginBuilder
takes a JSON object describing the configuration of an
input plugin and builds a InputPlugin.
A InputPluginBuilder
instance should be an empty struct that implements
this trait.
Required Methods§
sourcefn build(
&self,
parameters: &Value
) -> Result<Arc<dyn InputPlugin>, CompassConfigurationError>
fn build( &self, parameters: &Value ) -> Result<Arc<dyn InputPlugin>, CompassConfigurationError>
Builds a InputPlugin from JSON configuration.
§Arguments
parameters
- the contents of an element in the “input_plugin” array TOML config section
§Returns
A InputPlugin designed to persist the duration of the CompassApp.