pub struct RunInstruction {
pub span: Span,
pub expr: ShellOrExecExpr,
}
Expand description
A Dockerfile RUN
instruction.
An run command may be defined as either a single string (to be run in the default shell), or a list of strings (to be run directly).
Fields§
§span: Span
§expr: ShellOrExecExpr
Implementations§
Source§impl RunInstruction
impl RunInstruction
Sourcepub fn into_shell(self) -> Option<BreakableString>
pub fn into_shell(self) -> Option<BreakableString>
Unpacks this instruction into its inner value if it is a Shell-form instruction, otherwise returns None.
Sourcepub fn as_shell(&self) -> Option<&BreakableString>
pub fn as_shell(&self) -> Option<&BreakableString>
Unpacks this instruction into its inner value if it is a Shell-form instruction, otherwise returns None.
Sourcepub fn into_exec(self) -> Option<StringArray>
pub fn into_exec(self) -> Option<StringArray>
Unpacks this instruction into its inner value if it is an Exec-form instruction, otherwise returns None.
Sourcepub fn as_exec(&self) -> Option<&StringArray>
pub fn as_exec(&self) -> Option<&StringArray>
Unpacks this instruction into its inner value if it is an Exec-form instruction, otherwise returns None.
Trait Implementations§
Source§impl Clone for RunInstruction
impl Clone for RunInstruction
Source§fn clone(&self) -> RunInstruction
fn clone(&self) -> RunInstruction
Returns a copy 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 moreSource§impl Debug for RunInstruction
impl Debug for RunInstruction
Source§impl From<RunInstruction> for Instruction
impl From<RunInstruction> for Instruction
Source§fn from(ins: RunInstruction) -> Self
fn from(ins: RunInstruction) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RunInstruction
impl PartialEq for RunInstruction
Source§impl<'a> TryFrom<&'a Instruction> for &'a RunInstruction
impl<'a> TryFrom<&'a Instruction> for &'a RunInstruction
impl Eq for RunInstruction
impl StructuralPartialEq for RunInstruction
Auto Trait Implementations§
impl Freeze for RunInstruction
impl RefUnwindSafe for RunInstruction
impl Send for RunInstruction
impl Sync for RunInstruction
impl Unpin for RunInstruction
impl UnwindSafe for RunInstruction
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