pub struct ProcessSpawner { /* private fields */ }Expand description
Builder for spawning processes with optional parent reparenting and token source.
Implementations§
Source§impl ProcessSpawner
impl ProcessSpawner
Sourcepub fn parent(self, pid: ProcessId) -> Self
pub fn parent(self, pid: ProcessId) -> Self
Set the parent process for reparenting via process attributes.
Sourcepub fn as_user_of(self, pid: ProcessId) -> Self
pub fn as_user_of(self, pid: ProcessId) -> Self
Launch under a duplicated primary token from another process ID.
Sourcepub fn desktop(self, desktop: &str) -> Self
pub fn desktop(self, desktop: &str) -> Self
Set an explicit desktop for process creation (e.g. “winsta0\default”).
Sourcepub fn spawn(self) -> Result<SpawnedProcess>
pub fn spawn(self) -> Result<SpawnedProcess>
Spawn the process using the configured options.
Trait Implementations§
Source§impl Clone for ProcessSpawner
impl Clone for ProcessSpawner
Source§fn clone(&self) -> ProcessSpawner
fn clone(&self) -> ProcessSpawner
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 moreAuto Trait Implementations§
impl Freeze for ProcessSpawner
impl RefUnwindSafe for ProcessSpawner
impl Send for ProcessSpawner
impl Sync for ProcessSpawner
impl Unpin for ProcessSpawner
impl UnsafeUnpin for ProcessSpawner
impl UnwindSafe for ProcessSpawner
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