pub struct CommandRequest {
pub id: Uuid,
pub command: String,
pub args: Vec<String>,
pub env: HashMap<String, String>,
pub working_dir: Option<String>,
pub timeout: Option<Duration>,
pub stdin: Option<String>,
}Expand description
Command execution request
Fields§
§id: Uuid§command: String§args: Vec<String>§env: HashMap<String, String>§working_dir: Option<String>§timeout: Option<Duration>§stdin: Option<String>Implementations§
Source§impl CommandRequest
impl CommandRequest
pub fn new(command: impl Into<String>) -> Self
pub fn with_args(self, args: Vec<String>) -> Self
pub fn with_env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_working_dir(self, dir: impl Into<String>) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_stdin(self, stdin: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for CommandRequest
impl Clone for CommandRequest
Source§fn clone(&self) -> CommandRequest
fn clone(&self) -> CommandRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandRequest
impl Debug for CommandRequest
Source§impl<'de> Deserialize<'de> for CommandRequest
impl<'de> Deserialize<'de> for CommandRequest
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 CommandRequest
impl RefUnwindSafe for CommandRequest
impl Send for CommandRequest
impl Sync for CommandRequest
impl Unpin for CommandRequest
impl UnsafeUnpin for CommandRequest
impl UnwindSafe for CommandRequest
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