pub fn arg_index(&self, name: &str) -> Option<usize> {
    self.instructions
      .iter()
      .enumerate()
      .find_map(|(i, ins)| match ins {
        Instruction::Arg(a) => if a.name == name { Some(i) } else { None },
        _ => None
      })
  }
/// 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.
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.
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 .
pub fn arg_index(&self, name: &str) -> Option<usize> {
    self.instructions
      .iter()
      .enumerate()
      .find_map(|(i, ins)| match ins {
        Instruction::Arg(a) => if a.name == name { Some(i) } else { None },
        _ => None
      })
  }
pub fn arg_index ( & self , name : & str ) -> Option < usize > { self . instructions . iter ( ) . enumerate ( ) . find_map ( | ( i , ins ) | match ins { Instruction :: Arg ( a ) => if a . name == name { Some ( i ) } else { None } , _ => None } ) }
Finds the index, relative to this stage, of an ARG instruction defining
the given name.
Finds the index relative to this stage of an ARG instruction defining the given name .
&self
name
&str