pub struct WslExecutable(/* private fields */);Expand description
wsl.exe, as found on this host or as a test says it is.
§Why %SystemRoot% is used here and refused in crate::runner_root
runner_root derives the default runner root from GetSystemDirectoryW
and says explicitly that it will not read %SystemDrive%, because that
value decides where an ACL’d directory is created — a wrong answer there
is a security-relevant mistake that nothing downstream would notice.
This is the weaker question of where one well-known executable is, and its
wrong answer is loud: wsl.exe is either at the path or it is not, and a
missing program is a WslError::Spawn naming the path it tried. So the
environment is used as a hint, with a documented fallback to a bare
wsl.exe, which resolves through PATH exactly as it would in an
operator’s own shell.
Implementations§
Source§impl WslExecutable
impl WslExecutable
Trait Implementations§
Source§impl Clone for WslExecutable
impl Clone for WslExecutable
Source§fn clone(&self) -> WslExecutable
fn clone(&self) -> WslExecutable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WslExecutable
impl Debug for WslExecutable
Source§impl Default for WslExecutable
impl Default for WslExecutable
Source§impl Display for WslExecutable
impl Display for WslExecutable
impl Eq for WslExecutable
Source§impl PartialEq for WslExecutable
impl PartialEq for WslExecutable
impl StructuralPartialEq for WslExecutable
Auto Trait Implementations§
impl Freeze for WslExecutable
impl RefUnwindSafe for WslExecutable
impl Send for WslExecutable
impl Sync for WslExecutable
impl Unpin for WslExecutable
impl UnsafeUnpin for WslExecutable
impl UnwindSafe for WslExecutable
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