[−][src]Struct dockerfile_parser::Stage
A single stage in a multi-stage build.
A stage begins with (and includes) a FROM
instruction and continues until
(but does not include) the next FROM
instruction, if any.
Stages have an index and an optional alias. Later COPY --from=$index [...]
instructions may copy files between unnamed build stages. The alias, if
defined in this stage's FROM
instruction, may be used as well.
Note that instructions in a Dockerfile before the first FROM
are not
included in the first stage's list of instructions.
Fields
index: usize
The stage index.
name: Option<String>
The stage's FROM alias, if any.
instructions: Vec<&'a Instruction>
An ordered list of instructions in this stage.
parent: StageParent<'a>
The direct parent of this stage.
If this is the first stage, it will be equal to the root stage.
root: StageParent<'a>
The root image of this stage, either an external reference (possibly from
a remote registry) or scratch
.
Implementations
impl<'a> Stage<'a>
[src]
pub fn arg_index(&self, name: &str) -> Option<usize>
[src]
Finds the index, relative to this stage, of an ARG instruction defining the given name. Per the Dockerfile spec, only instructions following the ARG definition in a particular stage will have the value in scope, even if it was a defined globally or in a previous stage.
Trait Implementations
impl<'a> Debug for Stage<'a>
[src]
impl<'a> Eq for Stage<'a>
[src]
impl<'a> Ord for Stage<'a>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a> PartialEq<Stage<'a>> for Stage<'a>
[src]
impl<'a> PartialOrd<Stage<'a>> for Stage<'a>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a> StructuralEq for Stage<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Stage<'a>
impl<'a> Send for Stage<'a>
impl<'a> Sync for Stage<'a>
impl<'a> Unpin for Stage<'a>
impl<'a> UnwindSafe for Stage<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,