pub struct ShimConfig {
pub path: String,
pub args: Option<Vec<String>>,
pub working_dir: Option<String>,
pub env: Option<HashMap<String, String>>,
pub hide_console: Option<bool>,
pub run_as_admin: Option<bool>,
pub signal_handling: Option<SignalHandling>,
}Expand description
Shim configuration loaded from .shim files
Fields§
§path: StringPath to the target executable
args: Option<Vec<String>>Optional arguments to prepend to the command Can be either a string (legacy format) or array of strings (TOML format)
working_dir: Option<String>Working directory for the target executable
env: Option<HashMap<String, String>>Environment variables to set
hide_console: Option<bool>Whether to hide the console window (Windows only)
run_as_admin: Option<bool>Whether to run as administrator (Windows only)
signal_handling: Option<SignalHandling>Custom signal handling behavior
Implementations§
Source§impl ShimConfig
impl ShimConfig
Sourcepub fn resolved_path(&self) -> String
pub fn resolved_path(&self) -> String
Get the target executable path, resolving any environment variables
Sourcepub fn resolved_args(&self) -> Vec<String>
pub fn resolved_args(&self) -> Vec<String>
Get the resolved arguments as a vector
Sourcepub fn resolved_working_dir(&self) -> Option<String>
pub fn resolved_working_dir(&self) -> Option<String>
Get the resolved working directory
Sourcepub fn resolved_env(&self) -> HashMap<String, String>
pub fn resolved_env(&self) -> HashMap<String, String>
Get the resolved environment variables
Trait Implementations§
Source§impl Clone for ShimConfig
impl Clone for ShimConfig
Source§fn clone(&self) -> ShimConfig
fn clone(&self) -> ShimConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShimConfig
impl Debug for ShimConfig
Source§impl<'de> Deserialize<'de> for ShimConfig
impl<'de> Deserialize<'de> for ShimConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ShimConfig
impl RefUnwindSafe for ShimConfig
impl Send for ShimConfig
impl Sync for ShimConfig
impl Unpin for ShimConfig
impl UnwindSafe for ShimConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more