Struct procspawn::ProcConfig
source · pub struct ProcConfig { /* private fields */ }
Expand description
Can be used to configure the process.
Implementations§
source§impl ProcConfig
impl ProcConfig
sourcepub fn new() -> ProcConfig
pub fn new() -> ProcConfig
Creates a default proc config.
sourcepub fn config_callback<F: FnOnce() + 'static>(&mut self, f: F) -> &mut Self
pub fn config_callback<F: FnOnce() + 'static>(&mut self, f: F) -> &mut Self
Attaches a callback that is used to initializes all processes.
sourcepub fn pass_args(&mut self, enabled: bool) -> &mut Self
pub fn pass_args(&mut self, enabled: bool) -> &mut Self
Enables or disables argument passing.
By default all arguments are forwarded to the spawned process.
sourcepub fn panic_handling(&mut self, enabled: bool) -> &mut Self
pub fn panic_handling(&mut self, enabled: bool) -> &mut Self
Configure the automatic panic handling.
The default behavior is that panics are caught and that a panic handler is installed.
sourcepub fn capture_backtraces(&mut self, enabled: bool) -> &mut Self
pub fn capture_backtraces(&mut self, enabled: bool) -> &mut Self
Configures if backtraces should be captured.
The default behavior is that if panic handling is enabled backtraces will be captured.
This requires the backtrace
feature.
sourcepub fn resolve_backtraces(&mut self, enabled: bool) -> &mut Self
pub fn resolve_backtraces(&mut self, enabled: bool) -> &mut Self
Controls whether backtraces should be resolved.
Trait Implementations§
source§impl Default for ProcConfig
impl Default for ProcConfig
source§fn default() -> ProcConfig
fn default() -> ProcConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ProcConfig
impl !Send for ProcConfig
impl !Sync for ProcConfig
impl Unpin for ProcConfig
impl !UnwindSafe for ProcConfig
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