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

pub struct PluginProcessSpecification {
    pub executable: PathBuf,
    pub script: Option<PathBuf>,
    pub typ: PluginType,
}

Plugin specification, consisting of the executable filename for the plugin and an optional script filename for it to execute for when the executable is an interpreter.

Fields

executable: PathBuf

The executable filename of the plugin.

script: Option<PathBuf>

If specified, the executable is expected to be an interpreter, which is to execute the specified script file. If not specified, the executable is a native plugin.

typ: PluginType

Plugin type.

Implementations

impl PluginProcessSpecification[src]

pub fn new<T>(
    executable: impl Into<PathBuf>,
    script: Option<T>,
    typ: impl Into<PluginType>
) -> PluginProcessSpecification where
    T: Into<PathBuf>, 
[src]

Constructs a new plugin specification.

pub fn from_sugar(
    specification: impl Into<PathBuf>,
    typ: PluginType
) -> Result<PluginProcessSpecification>
[src]

Constructs a plugin specification from a "sugared" specification.

The specification can take the following forms:

  • a valid path to a plugin executable with no file extension;
  • the basename of a plugin executable with no file extension with implicit "dqcsfe"/"dqcsop"/"dqcsbe" prefix, searched for in A) the working directory, B) the binary directory, and C) the system $PATH;
  • a valid path to a script file with a file extension. In this case, the above rule is run for a plugin named by the file extension of the script file. For instance, if "test.py" is specified for the frontend, this will look for an executable named "dqcsfepy".

Failure to find the plugin executable or script file results in an error being returned.

Trait Implementations

impl Clone for PluginProcessSpecification[src]

impl Debug for PluginProcessSpecification[src]

impl<'de> Deserialize<'de> for PluginProcessSpecification[src]

impl PartialEq<PluginProcessSpecification> for PluginProcessSpecification[src]

impl Serialize for PluginProcessSpecification[src]

impl StructuralPartialEq for PluginProcessSpecification[src]

Auto Trait Implementations

impl RefUnwindSafe for PluginProcessSpecification

impl Send for PluginProcessSpecification

impl Sync for PluginProcessSpecification

impl Unpin for PluginProcessSpecification

impl UnwindSafe for PluginProcessSpecification

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,