pub struct OwnedCommand { /* private fields */ }Implementations§
Source§impl OwnedCommand
impl OwnedCommand
pub fn new(program: impl AsRef<OsStr>) -> Self
Sourcepub fn from_command(command: Command) -> Self
pub fn from_command(command: Command) -> Self
On Windows the child gets CREATE_NO_WINDOW by default: RightKit hosts are GUI apps and background services, so a console window would only ever flash on the user’s desktop.
pub fn command_mut(&mut self) -> &mut Command
Sourcepub fn env_allowlist<I, S>(&mut self, keys: I) -> &mut Self
pub fn env_allowlist<I, S>(&mut self, keys: I) -> &mut Self
Run the child with a scrubbed environment: everything is cleared, then
only the named variables that are set in this process are copied
across (HeardRight’s sidecar whitelist). Include PATH and the
platform basics yourself, or start from DEFAULT_ENV_ALLOWLIST.
Variables set explicitly afterwards through Self::command_mut win.
Sourcepub fn env_strip<I, S>(&mut self, keys: I) -> &mut Self
pub fn env_strip<I, S>(&mut self, keys: I) -> &mut Self
Remove the named variables from the child’s inherited environment (secrets, BYOK keys) without clearing the rest.
Sourcepub fn windows_hide(&mut self) -> &mut Self
pub fn windows_hide(&mut self) -> &mut Self
Kept for callers written before hiding became the default; it is now a no-op.
pub fn spawn(self) -> Result<OwnedChild>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for OwnedCommand
impl !UnwindSafe for OwnedCommand
impl Freeze for OwnedCommand
impl Send for OwnedCommand
impl Sync for OwnedCommand
impl Unpin for OwnedCommand
impl UnsafeUnpin for OwnedCommand
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