Struct dockerfile_parser::EntrypointInstruction
source · [−]pub struct EntrypointInstruction {
pub span: Span,
pub expr: ShellOrExecExpr,
}Expand description
A Dockerfile ENTRYPOINT instruction.
An entrypoint 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 EntrypointInstruction
impl EntrypointInstruction
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 EntrypointInstruction
impl Clone for EntrypointInstruction
sourcefn clone(&self) -> EntrypointInstruction
fn clone(&self) -> EntrypointInstruction
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 EntrypointInstruction
impl Debug for EntrypointInstruction
sourceimpl From<EntrypointInstruction> for Instruction
impl From<EntrypointInstruction> for Instruction
sourcefn from(ins: EntrypointInstruction) -> Self
fn from(ins: EntrypointInstruction) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<EntrypointInstruction> for EntrypointInstruction
impl PartialEq<EntrypointInstruction> for EntrypointInstruction
sourcefn eq(&self, other: &EntrypointInstruction) -> bool
fn eq(&self, other: &EntrypointInstruction) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &EntrypointInstruction) -> bool
fn ne(&self, other: &EntrypointInstruction) -> bool
This method tests for !=.
sourceimpl TryFrom<Instruction> for EntrypointInstruction
impl TryFrom<Instruction> for EntrypointInstruction
impl Eq for EntrypointInstruction
impl StructuralEq for EntrypointInstruction
impl StructuralPartialEq for EntrypointInstruction
Auto Trait Implementations
impl RefUnwindSafe for EntrypointInstruction
impl Send for EntrypointInstruction
impl Sync for EntrypointInstruction
impl Unpin for EntrypointInstruction
impl UnwindSafe for EntrypointInstruction
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