pub struct ArgFileCommand {
command: Command,
args: Vec<OsString>,
}Expand description
A wrapper around Command that adds support for arg files.
This is useful as we have some commands that can get very long and at times
hit the OS limit (usually Windows)
This implementation is based off the ProcessBuilder implementation in Cargo
but simplified.
NOTE: In most scenarios we want to avoid arg files as it makes debugging more complicated so we try to avoid it if the command is not close to the OS limit.
Fields§
§command: Command§args: Vec<OsString>Implementations§
Source§impl ArgFileCommand
impl ArgFileCommand
pub fn new<S: AsRef<OsStr>>(program: S) -> Self
pub fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self
pub fn args<I, S>(&mut self, args: I) -> &mut Self
pub fn env<K, V>(&mut self, key: K, val: V) -> &mut Self
pub fn get_envs(&self) -> CommandEnvs<'_>
pub fn env_remove<K: AsRef<OsStr>>(&mut self, key: K) -> &mut Self
pub fn current_dir<P: AsRef<Path>>(&mut self, dir: P) -> &mut Self
pub fn stdin(&mut self, stdin: Stdio) -> &mut Self
pub fn build(self) -> Result<(Command, Option<NamedTempFile>)>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ArgFileCommand
impl !UnwindSafe for ArgFileCommand
impl Freeze for ArgFileCommand
impl Send for ArgFileCommand
impl Sync for ArgFileCommand
impl Unpin for ArgFileCommand
impl UnsafeUnpin for ArgFileCommand
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 224 bytes