pub struct ProcessConfig { /* private fields */ }Expand description
Configuration for spawning a managed process.
Implementations§
Source§impl ProcessConfig
impl ProcessConfig
Sourcepub fn new(binary_path: impl Into<PathBuf>, role: ProcessRole) -> Self
pub fn new(binary_path: impl Into<PathBuf>, role: ProcessRole) -> Self
Creates a new process configuration.
§Arguments
binary_path- Path to the executable binaryrole- Whether this is a runtime or extension process
Sourcepub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Adds an environment variable to the process.
These are merged with the Lambda environment variables provided by the simulator, with these taking precedence.
Sourcepub fn inherit_stdio(self, inherit: bool) -> Self
pub fn inherit_stdio(self, inherit: bool) -> Self
Sets whether to inherit stdio from the parent process.
When true (the default), stdout and stderr from the spawned process will be visible. This is useful for demos and debugging.
Sourcepub fn role(&self) -> ProcessRole
pub fn role(&self) -> ProcessRole
Returns the role of this process.
Sourcepub fn binary_path(&self) -> &Path
pub fn binary_path(&self) -> &Path
Returns the binary path.
Trait Implementations§
Source§impl Clone for ProcessConfig
impl Clone for ProcessConfig
Source§fn clone(&self) -> ProcessConfig
fn clone(&self) -> ProcessConfig
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 ProcessConfig
impl RefUnwindSafe for ProcessConfig
impl Send for ProcessConfig
impl Sync for ProcessConfig
impl Unpin for ProcessConfig
impl UnwindSafe for ProcessConfig
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