[][src]Struct dqcsim::host::configuration::PluginThreadConfiguration

pub struct PluginThreadConfiguration {
    pub closure: PluginThreadClosure,
    pub plugin_type: PluginType,
    pub init_cmds: Vec<ArbCmd>,
    pub log_configuration: PluginLogConfiguration,
}

Represents the complete configuration for a plugin running in a local thread.

Fields

closure: PluginThreadClosure

The closure that's called from within the plugin thread. It is responsible for calling PluginState::run() in one way or another.

plugin_type: PluginType

The type of plugin that the closure is expected to start.

init_cmds: Vec<ArbCmd>

The vector of ArbCmds passed to the initialize() closure.

This is mostly useless since you can also just move data directly into the closures prior to plugin construction. Therefore it is not part of the constructor function. It is mostly just left here for uniformity with the external process method of constructing a plugin.

log_configuration: PluginLogConfiguration

Configuration for the logging subsystem of the plugin.

Methods

impl PluginThreadConfiguration[src]

pub fn new(
    definition: PluginDefinition,
    log_configuration: PluginLogConfiguration
) -> PluginThreadConfiguration
[src]

Creates a new plugin configuration.

The default values are inserted for the configuration options.

pub fn new_raw(
    closure: PluginThreadClosure,
    plugin_type: PluginType,
    log_configuration: PluginLogConfiguration
) -> PluginThreadConfiguration
[src]

Creates a new plugin through a custom closure.

The default values are inserted for the configuration options.

pub fn with_init_cmd(self, cmd: impl Into<ArbCmd>) -> PluginThreadConfiguration[src]

Adds an init cmd to the list, builder style.

Trait Implementations

impl PluginConfiguration for PluginThreadConfiguration[src]

impl Into<Box<dyn PluginConfiguration + 'static>> for PluginThreadConfiguration[src]

impl Debug for PluginThreadConfiguration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,