pub struct JobObject;Available on Windows and crate feature
job-object and crate feature std only.Expand description
Wrapper which creates a job object context for a Command.
This wrapper is only available on Windows.
It creates a Windows Job Object and associates the Command to it. This behaves analogously
to process groups on Unix or even cgroups on Linux, with the ability to restrict resource use.
See Job Objects.
This wrapper provides a child wrapper: JobObjectChild.
When both CreationFlags and JobObject are used together, CreationFlags must come first.
Trait Implementations§
Source§impl StdCommandWrapper for JobObject
impl StdCommandWrapper for JobObject
Source§fn pre_spawn(
&mut self,
command: &mut Command,
core: &StdCommandWrap,
) -> Result<()>
fn pre_spawn( &mut self, command: &mut Command, core: &StdCommandWrap, ) -> Result<()>
Called before the command is spawned, to mutate it as needed. Read more
Source§fn wrap_child(
&mut self,
inner: Box<dyn StdChildWrapper>,
core: &StdCommandWrap,
) -> Result<Box<dyn StdChildWrapper>>
fn wrap_child( &mut self, inner: Box<dyn StdChildWrapper>, core: &StdCommandWrap, ) -> Result<Box<dyn StdChildWrapper>>
Called to wrap a child into this command wrapper’s child wrapper. Read more
Source§fn extend(&mut self, _other: Box<dyn StdCommandWrapper>)
fn extend(&mut self, _other: Box<dyn StdCommandWrapper>)
Called on a first instance if a second of the same type is added. Read more
Source§fn post_spawn(
&mut self,
_child: &mut Child,
_core: &StdCommandWrap,
) -> Result<()>
fn post_spawn( &mut self, _child: &mut Child, _core: &StdCommandWrap, ) -> Result<()>
Called after spawn, but before the child is wrapped. Read more
impl Copy for JobObject
Auto Trait Implementations§
impl Freeze for JobObject
impl RefUnwindSafe for JobObject
impl Send for JobObject
impl Sync for JobObject
impl Unpin for JobObject
impl UnwindSafe for JobObject
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