pub struct ExecRequest { /* private fields */ }Expand description
A command to run inside a running container.
Implementations§
Source§impl ExecRequest
impl ExecRequest
Sourcepub fn new(command: Vec<String>) -> Self
pub fn new(command: Vec<String>) -> Self
Creates a request that runs command with the container’s environment and no standard input.
Sourcepub fn with_env_var(self, key: impl AsRef<str>, value: impl AsRef<str>) -> Self
pub fn with_env_var(self, key: impl AsRef<str>, value: impl AsRef<str>) -> Self
Adds an environment variable for this command.
Sourcepub fn with_stdin(self, stdin: Bytes) -> Self
pub fn with_stdin(self, stdin: Bytes) -> Self
Writes stdin to the command’s standard input, which is then closed. The command may exit without reading it
all.
Trait Implementations§
Source§impl Clone for ExecRequest
impl Clone for ExecRequest
Source§fn clone(&self) -> ExecRequest
fn clone(&self) -> ExecRequest
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 moreAuto Trait Implementations§
impl !Freeze for ExecRequest
impl RefUnwindSafe for ExecRequest
impl Send for ExecRequest
impl Sync for ExecRequest
impl Unpin for ExecRequest
impl UnsafeUnpin for ExecRequest
impl UnwindSafe for ExecRequest
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