pub struct CreationFlags(pub PROCESS_CREATION_FLAGS);Available on Windows and crate feature
creation-flags and crate feature std only.Expand description
Shim wrapper which sets Windows process creation flags.
This wrapper is only available on Windows.
It exists to be able to set creation flags on a Command and also store them in the wrapper, so
that they’re no overwritten by other wrappers. Notably this is the only way to use creation
flags and the JobObject wrapper together.
When both CreationFlags and JobObject are used together, either:
CreationFlagsmust come first, orCreationFlagsmust includeCREATE_SUSPENDED
Tuple Fields§
§0: PROCESS_CREATION_FLAGSTrait Implementations§
Source§impl Clone for CreationFlags
impl Clone for CreationFlags
Source§fn clone(&self) -> CreationFlags
fn clone(&self) -> CreationFlags
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 CommandWrapper for CreationFlags
impl CommandWrapper for CreationFlags
Source§fn pre_spawn(
&mut self,
command: &mut Command,
_core: &CommandWrap,
) -> Result<()>
fn pre_spawn( &mut self, command: &mut Command, _core: &CommandWrap, ) -> Result<()>
Called before the command is spawned, to mutate it as needed. Read more
Source§fn extend(&mut self, _other: Box<dyn CommandWrapper>)
fn extend(&mut self, _other: Box<dyn CommandWrapper>)
Called on a first instance if a second of the same type is added. Read more
Source§fn post_spawn(
&mut self,
_command: &mut Command,
_child: &mut Child,
_core: &CommandWrap,
) -> Result<()>
fn post_spawn( &mut self, _command: &mut Command, _child: &mut Child, _core: &CommandWrap, ) -> Result<()>
Called after spawn, but before the child is wrapped. Read more
Source§fn wrap_child(
&mut self,
child: Box<dyn ChildWrapper>,
_core: &CommandWrap,
) -> Result<Box<dyn ChildWrapper>>
fn wrap_child( &mut self, child: Box<dyn ChildWrapper>, _core: &CommandWrap, ) -> Result<Box<dyn ChildWrapper>>
Called to wrap a child into this command wrapper’s child wrapper. Read more
Source§impl Debug for CreationFlags
impl Debug for CreationFlags
impl Copy for CreationFlags
Auto Trait Implementations§
impl Freeze for CreationFlags
impl RefUnwindSafe for CreationFlags
impl Send for CreationFlags
impl Sync for CreationFlags
impl Unpin for CreationFlags
impl UnwindSafe for CreationFlags
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