[][src]Trait dqcsim::host::configuration::PluginConfiguration

pub trait PluginConfiguration: Debug {
    fn instantiate(self: Box<Self>) -> Box<dyn Plugin>;
fn get_log_configuration(&self) -> PluginLogConfiguration;
fn get_type(&self) -> PluginType;
fn get_reproduction(
        &self,
        path_style: ReproductionPathStyle
    ) -> Result<PluginReproduction>;
fn limit_verbosity(&mut self, max_verbosity: LoglevelFilter);
fn set_default_name(&mut self, default_name: String); }

Trait for types of configurations. The only thing that needs to be implemented is a way to instantiate a Plugin from it, and to return the log configuration of the Plugin.

Required methods

fn instantiate(self: Box<Self>) -> Box<dyn Plugin>

Instantiates the plugin.

fn get_log_configuration(&self) -> PluginLogConfiguration

Returns the log configuratin of the plugin. Note that this returns a copy!

fn get_type(&self) -> PluginType

Returns the plugin type.

fn get_reproduction(
    &self,
    path_style: ReproductionPathStyle
) -> Result<PluginReproduction>

Returns the PluginReproduction when possible. Otherwise return an error.

fn limit_verbosity(&mut self, max_verbosity: LoglevelFilter)

Limits the verbosity of the messages reported to the simulator.

Called when the simulation is initialized to limit the plugin's verbosity to what DQCsim is actually reporting to the user. This prevents unnecessarily verbose messages from passing over the communication channels.

fn set_default_name(&mut self, default_name: String)

Sets the default name for this plugin.

Called when the simulation is initialized. If the plugin did not already have an explicit name assigned to it, this value can be used.

Loading content...

Implementations

impl dyn PluginConfiguration[src]

pub fn get_name(&self) -> String[src]

Implementors

impl PluginConfiguration for PluginProcessConfiguration[src]

impl PluginConfiguration for PluginThreadConfiguration[src]

Loading content...