pub struct CommandBuilder<'a> { /* private fields */ }Expand description
Builder for creating and executing commands
Implementations§
Source§impl<'a> CommandBuilder<'a>
impl<'a> CommandBuilder<'a>
pub fn arg(self, arg: impl Into<String>) -> Self
pub fn args<I, S>(self, args: I) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn envs<I, K, V>(self, vars: I) -> Self
pub fn current_dir(self, dir: impl Into<String>) -> Self
pub fn timeout(self, timeout: Duration) -> Self
pub fn stdin(self, stdin: impl Into<String>) -> Self
pub async fn execute( self, ) -> Result<Pin<Box<dyn Stream<Item = CommandEvent> + Send>>, UbiquityError>
pub async fn output(self) -> Result<CommandOutput, UbiquityError>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CommandBuilder<'a>
impl<'a> !UnwindSafe for CommandBuilder<'a>
impl<'a> Freeze for CommandBuilder<'a>
impl<'a> Send for CommandBuilder<'a>
impl<'a> Sync for CommandBuilder<'a>
impl<'a> Unpin for CommandBuilder<'a>
impl<'a> UnsafeUnpin for CommandBuilder<'a>
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