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

pub trait PluginConfiguration: Debug {
    pub fn instantiate(self: Box<Self>) -> Box<dyn Plugin>;
pub fn get_log_configuration(&self) -> PluginLogConfiguration;
pub fn get_type(&self) -> PluginType;
pub fn get_reproduction(
        &self,
        path_style: ReproductionPathStyle
    ) -> Result<PluginReproduction>;
pub fn limit_verbosity(&mut self, max_verbosity: LoglevelFilter);
pub 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

pub fn instantiate(self: Box<Self>) -> Box<dyn Plugin>[src]

Instantiates the plugin.

pub fn get_log_configuration(&self) -> PluginLogConfiguration[src]

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

pub fn get_type(&self) -> PluginType[src]

Returns the plugin type.

pub fn get_reproduction(
    &self,
    path_style: ReproductionPathStyle
) -> Result<PluginReproduction>
[src]

Returns the PluginReproduction when possible. Otherwise return an error.

pub fn limit_verbosity(&mut self, max_verbosity: LoglevelFilter)[src]

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.

pub fn set_default_name(&mut self, default_name: String)[src]

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...