#[non_exhaustive]pub struct CommandSpec {
pub argv: Vec<String>,
pub stdin_text: Option<String>,
pub cwd: Option<PathBuf>,
pub env: BTreeMap<String, String>,
pub timeout_secs: Option<u64>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.argv: Vec<String>§stdin_text: Option<String>§cwd: Option<PathBuf>§env: BTreeMap<String, String>§timeout_secs: Option<u64>Implementations§
Source§impl CommandSpec
impl CommandSpec
pub fn new<I, S>(argv: I) -> Self
pub fn with_stdin(self, stdin_text: impl Into<String>) -> Self
pub fn with_cwd(self, cwd: impl Into<PathBuf>) -> Self
pub fn with_env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_timeout_secs(self, secs: u64) -> Self
Trait Implementations§
Source§impl Clone for CommandSpec
impl Clone for CommandSpec
Source§fn clone(&self) -> CommandSpec
fn clone(&self) -> CommandSpec
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 Debug for CommandSpec
impl Debug for CommandSpec
Source§impl PartialEq for CommandSpec
impl PartialEq for CommandSpec
impl Eq for CommandSpec
impl StructuralPartialEq for CommandSpec
Auto Trait Implementations§
impl Freeze for CommandSpec
impl RefUnwindSafe for CommandSpec
impl Send for CommandSpec
impl Sync for CommandSpec
impl Unpin for CommandSpec
impl UnsafeUnpin for CommandSpec
impl UnwindSafe for CommandSpec
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