pub struct CommandBuilder { /* private fields */ }Implementations§
Source§impl CommandBuilder
impl CommandBuilder
pub fn new(kind: CommandKind) -> CommandBuilder
pub fn use_command(&mut self, kind: CommandKind) -> &mut Self
pub fn use_cache_dir(&mut self, cache: impl AsRef<Path>) -> &mut Self
pub async fn bust_cache(&self) -> Result<()>
pub fn use_cache_behaviour(&mut self, behaviour: CacheBehaviour) -> &mut Self
pub fn use_run_dir(&mut self, dir: impl AsRef<Path>) -> &mut Self
pub fn use_retry_behaviour(&mut self, behaviour: RetryBehaviour) -> &mut Self
pub fn use_output_behaviour(&mut self, behaviour: OutputBehaviour) -> &mut Self
pub fn use_timeout(&mut self, timeout: Duration) -> &mut Self
pub fn args<I, S>(&mut self, args: I) -> &mut Self
pub fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self
pub fn file_arg<S: AsRef<Path>>( &mut self, path: S, content: String, ) -> &mut Self
pub fn env(&mut self, key: impl AsRef<str>, value: impl AsRef<str>) -> &mut Self
pub fn should_announce(&mut self, value: bool) -> &mut Self
pub async fn summarize(&self) -> String
pub async fn get_cached_output(&self) -> Result<Option<CommandOutput>>
pub async fn write_output( &self, output: &CommandOutput, parent_dir: &PathBuf, ) -> Result<()>
Sourcepub fn send_stdin(&mut self, content: impl Into<String>) -> &mut Self
pub fn send_stdin(&mut self, content: impl Into<String>) -> &mut Self
Sends content to stdin of the command.
pub fn run_raw_inner<'life_self, 'async_recursion>(
&'life_self self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_recursion>>where
'life_self: 'async_recursion,
pub async fn run_raw(&self) -> Result<CommandOutput>
pub async fn run<T>(&self) -> Result<T>where
T: DeserializeOwned,
pub async fn run_with_validator<T, F>(&self, validator: F) -> Result<T>
pub async fn write_failure(&self, output: &CommandOutput) -> Result<PathBuf>
Trait Implementations§
Source§impl Clone for CommandBuilder
impl Clone for CommandBuilder
Source§fn clone(&self) -> CommandBuilder
fn clone(&self) -> CommandBuilder
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 CommandBuilder
impl Debug for CommandBuilder
Source§impl Default for CommandBuilder
impl Default for CommandBuilder
Source§fn default() -> CommandBuilder
fn default() -> CommandBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CommandBuilder
impl RefUnwindSafe for CommandBuilder
impl Send for CommandBuilder
impl Sync for CommandBuilder
impl Unpin for CommandBuilder
impl UnwindSafe for CommandBuilder
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