Struct dockerfile_parser::RunInstruction
source · [−]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: Spanexpr: ShellOrExecExprImplementations
sourceimpl 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
sourceimpl Clone for RunInstruction
impl Clone for RunInstruction
sourcefn clone(&self) -> RunInstruction
fn clone(&self) -> RunInstruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for RunInstruction
impl Debug for RunInstruction
sourceimpl From<RunInstruction> for Instruction
impl From<RunInstruction> for Instruction
sourcefn from(ins: RunInstruction) -> Self
fn from(ins: RunInstruction) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<RunInstruction> for RunInstruction
impl PartialEq<RunInstruction> for RunInstruction
sourcefn eq(&self, other: &RunInstruction) -> bool
fn eq(&self, other: &RunInstruction) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &RunInstruction) -> bool
fn ne(&self, other: &RunInstruction) -> bool
This method tests for !=.
sourceimpl<'a> TryFrom<&'a Instruction> for &'a RunInstruction
impl<'a> TryFrom<&'a Instruction> for &'a RunInstruction
impl Eq for RunInstruction
impl StructuralEq for RunInstruction
impl StructuralPartialEq for RunInstruction
Auto Trait Implementations
impl RefUnwindSafe for RunInstruction
impl Send for RunInstruction
impl Sync for RunInstruction
impl Unpin for RunInstruction
impl UnwindSafe for RunInstruction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more