WineRunExt

Trait WineRunExt 

Source
pub trait WineRunExt {
    // Required methods
    fn run<T: AsRef<OsStr>>(&self, binary: T) -> Result<Child>;
    fn run_args<T, S>(&self, args: T) -> Result<Child>
       where T: IntoIterator<Item = S>,
             S: AsRef<OsStr>;
    fn run_args_with_env<T, K, S>(&self, args: T, envs: K) -> Result<Child>
       where T: IntoIterator<Item = S>,
             K: IntoIterator<Item = (S, S)>,
             S: AsRef<OsStr>;
    fn winepath(&self, path: &str) -> Result<PathBuf>;
}

Required Methods§

Source

fn run<T: AsRef<OsStr>>(&self, binary: T) -> Result<Child>

Execute some command using wine

use wincompatlib::prelude::*;
 
let process = Wine::default().run("/your/executable");
Source

fn run_args<T, S>(&self, args: T) -> Result<Child>
where T: IntoIterator<Item = S>, S: AsRef<OsStr>,

Execute some command with args using wine

use wincompatlib::prelude::*;
 
let process = Wine::default().run_args(["/your/executable", "--help"]);
Source

fn run_args_with_env<T, K, S>(&self, args: T, envs: K) -> Result<Child>
where T: IntoIterator<Item = S>, K: IntoIterator<Item = (S, S)>, S: AsRef<OsStr>,

Execute some command with args and environment variables using wine

use wincompatlib::prelude::*;
 
let process = Wine::default().run_args_with_env(["/your/executable", "--help"], [
    ("YOUR", "variable")
]);
Source

fn winepath(&self, path: &str) -> Result<PathBuf>

Get unix path to the windows folder in the wine prefix

use wincompatlib::prelude::*;
 
println!("System32 path: {:?}", Wine::default().winepath("C:\\windows\\system32"));

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§