pub struct Command { /* private fields */ }
Available on crate feature
process
only.Expand description
A simplified representation of an OS command that can be used to create a SpawnedCommand
.
Implementations§
Source§impl Command
impl Command
Sourcepub fn insert_arg<S>(self, index: usize, arg: S) -> Self
pub fn insert_arg<S>(self, index: usize, arg: S) -> Self
Inserts an argument at the given position.
Sourcepub fn stderr_handle<S>(self, stderr_handle: S) -> Self
pub fn stderr_handle<S>(self, stderr_handle: S) -> Self
Sets the Stdio
handle for the stderr
stream of the command. This is used for error
reporting in case of a failure.
Setting this value will override the default behavior of creating a temporary file to store the output. See the module documentation for why this is necessary.
Trait Implementations§
Source§impl From<FfmpegConvertAudioCommand> for Command
impl From<FfmpegConvertAudioCommand> for Command
Source§fn from(value: FfmpegConvertAudioCommand) -> Self
fn from(value: FfmpegConvertAudioCommand) -> Self
Converts to this type from the input type.
Source§impl From<YtDlpCommand> for Command
impl From<YtDlpCommand> for Command
Source§fn from(value: YtDlpCommand) -> Self
fn from(value: YtDlpCommand) -> Self
Converts to this type from the input type.
Source§impl SpawnCommand for Command
impl SpawnCommand for Command
Source§fn spawn(self) -> Result<SpawnedCommand>
fn spawn(self) -> Result<SpawnedCommand>
Spawns the command with the stdout and stderr handles configured appropriately.
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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