pub struct Command {
pub command: String,
pub current_dir: Option<PathBuf>,
pub envs: Vec<(String, String)>,
}Expand description
A command to be executed by the runner.
Fields§
§command: String§current_dir: Option<PathBuf>§envs: Vec<(String, String)>Implementations§
Source§impl Command
impl Command
pub fn new(cmd: impl Into<String>) -> Self
pub fn env( &mut self, key: impl Into<String>, value: impl Into<String>, ) -> &mut Self
pub fn dir(&mut self, dir: &Path) -> &mut Self
pub async fn exec(&mut self) -> Result<String>
pub async fn run(&mut self, sender: StreamSender) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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