#[non_exhaustive]pub struct ShellCommand {
pub program: String,
pub args: Vec<String>,
pub cwd: PathBuf,
pub env: Vec<(String, String)>,
}Expand description
The command that opens an interactive console into a machine (a shell in a container, vagrant ssh, an SSH login): the runner builds it (it alone knows the runtime: the Compose project and
files, the Vagrant define, the address and user a module gives), the embedder runs it in its
own terminal. Addresses the machine by service or define name, or by the address the run gives
it, never a guessed container.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.program: StringThe program to run (docker, vagrant, ssh).
args: Vec<String>Its arguments.
cwd: PathBufThe folder to run it in (the run’s folder).
env: Vec<(String, String)>Variables to run it with, besides the embedder’s own (a Vagrant run’s state folder,
VAGRANT_DOTFILE_PATH, without which Vagrant doesn’t find the VM; its forwarded ports).
Empty for a Compose service on this computer and for an SSH login.
Implementations§
Source§impl ShellCommand
impl ShellCommand
Sourcepub fn new(
program: impl Into<String>,
args: impl IntoIterator<Item = impl Into<String>>,
cwd: impl Into<PathBuf>,
) -> ShellCommand
pub fn new( program: impl Into<String>, args: impl IntoIterator<Item = impl Into<String>>, cwd: impl Into<PathBuf>, ) -> ShellCommand
program with args, run in cwd, with no variable of its own.
Trait Implementations§
Source§impl Clone for ShellCommand
impl Clone for ShellCommand
Source§impl Debug for ShellCommand
impl Debug for ShellCommand
Source§impl<'de> Deserialize<'de> for ShellCommand
impl<'de> Deserialize<'de> for ShellCommand
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>,
impl Eq for ShellCommand
Source§impl JsonSchema for ShellCommand
impl JsonSchema for ShellCommand
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ShellCommand
impl PartialEq for ShellCommand
Source§impl Serialize for ShellCommand
impl Serialize for ShellCommand
impl StructuralPartialEq for ShellCommand
Auto Trait Implementations§
impl Forget for ShellCommand
impl Freeze for ShellCommand
impl Move for ShellCommand
impl RefUnwindSafe for ShellCommand
impl Send for ShellCommand
impl Sync for ShellCommand
impl Unpin for ShellCommand
impl UnsafeUnpin for ShellCommand
impl UnwindSafe for ShellCommand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.