Struct procspawn::PoolBuilder
source · pub struct PoolBuilder { /* private fields */ }Expand description
Utility to configure a pool.
This requires the pool feature.
Implementations§
source§impl PoolBuilder
impl PoolBuilder
sourcepub fn env<K, V>(&mut self, key: K, val: V) -> &mut Selfwhere
K: AsRef<OsStr>,
V: AsRef<OsStr>,
pub fn env<K, V>(&mut self, key: K, val: V) -> &mut Selfwhere K: AsRef<OsStr>, V: AsRef<OsStr>,
Set an environment variable in the spawned process.
Equivalent to Command::env
sourcepub fn envs<I, K, V>(&mut self, vars: I) -> &mut Selfwhere
I: IntoIterator<Item = (K, V)>,
K: AsRef<OsStr>,
V: AsRef<OsStr>,
pub fn envs<I, K, V>(&mut self, vars: I) -> &mut Selfwhere I: IntoIterator<Item = (K, V)>, K: AsRef<OsStr>, V: AsRef<OsStr>,
Set environment variables in the spawned process.
Equivalent to Command::envs
sourcepub fn env_remove<K: AsRef<OsStr>>(&mut self, key: K) -> &mut Self
pub fn env_remove<K: AsRef<OsStr>>(&mut self, key: K) -> &mut Self
Removes an environment variable in the spawned process.
Equivalent to Command::env_remove
sourcepub fn env_clear(&mut self) -> &mut Self
pub fn env_clear(&mut self) -> &mut Self
Clears all environment variables in the spawned process.
Equivalent to Command::env_clear
sourcepub fn disable_stdin(&mut self) -> &mut Self
pub fn disable_stdin(&mut self) -> &mut Self
Redirects stdin to /dev/null.
sourcepub fn disable_stdout(&mut self) -> &mut Self
pub fn disable_stdout(&mut self) -> &mut Self
Redirects stdout to /dev/null.
sourcepub fn disable_stderr(&mut self) -> &mut Self
pub fn disable_stderr(&mut self) -> &mut Self
Redirects stderr to /dev/null.
sourcepub fn build(&mut self) -> Result<Pool, SpawnError>
pub fn build(&mut self) -> Result<Pool, SpawnError>
Creates the pool.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PoolBuilder
impl Send for PoolBuilder
impl Sync for PoolBuilder
impl Unpin for PoolBuilder
impl UnwindSafe for PoolBuilder
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