pub fn resolve_vars_with_context<'a>(
    &self, dockerfile: &'a Dockerfile
  ) -> Option<(ImageRef, HashSet<String>)> {
    let vars: HashMap<&'a str, &'a str> = HashMap::from_iter(
      dockerfile.global_args
        .iter()
        .filter_map(|a| match a.value.as_deref() {
          Some(v) => Some((a.name.as_str(), v)),
          None => None
        })
    );

    let mut used_vars = HashSet::new();

    if let Some(s) = substitute(&self.to_string(), &vars, &mut used_vars, 16) {
      Some((ImageRef::parse(&s), used_vars))
    } else {
      None
    }
  }
/// Given a Dockerfile (and its global `ARG`s), perform any necessary
/// variable substitution to resolve any variable references in this
/// `ImageRef` and returns a list of variables included in the end result.
///
/// If this `ImageRef` contains any unknown variables or if any references are
/// excessively recursive, returns None; otherwise, returns the
/// fully-substituted string.
Given a Dockerfile (and its global `ARG`s), perform any necessary
variable substitution to resolve any variable references in this
`ImageRef` and returns a list of variables included in the end result.

If this `ImageRef` contains any unknown variables or if any references are
excessively recursive, returns None; otherwise, returns the
fully-substituted string.
Given a Dockerfile ( and its global ` ARG ` s ) perform any necessary variable substitution to resolve any variable references in this ` ImageRef ` and returns a list of variables included in the end result . If this ` ImageRef ` contains any unknown variables or if any references are excessively recursive returns None ; otherwise returns the fully - substituted string .
pub fn resolve_vars_with_context<'a>(
    &self, dockerfile: &'a Dockerfile
  ) -> Option<(ImageRef, HashSet<String>)> {
    let vars: HashMap<&'a str, &'a str> = HashMap::from_iter(
      dockerfile.global_args
        .iter()
        .filter_map(|a| match a.value.as_deref() {
          Some(v) => Some((a.name.as_str(), v)),
          None => None
        })
    );
    let mut used_vars = HashSet::new();
    if let Some(s) = substitute(&self.to_string(), &vars, &mut used_vars, 16) {
      Some((ImageRef::parse(&s), used_vars))
    } else {
      None
    }
  }
pub fn resolve_vars_with_context < ' a > ( & self , dockerfile : & ' a Dockerfile ) -> Option < ( ImageRef , HashSet < String > ) > { let vars : HashMap < & ' a str , & ' a str > = HashMap :: from_iter ( dockerfile . global_args . iter ( ) . filter_map ( | a | match a . value . as_deref ( ) { Some ( v ) => Some ( ( a . name . as_str ( ) , v ) ) , None => None } ) ) ; let mut used_vars = HashSet :: new ( ) ; if let Some ( s ) = substitute ( & self . to_string ( ) , & vars , & mut used_vars , 16 ) { Some ( ( ImageRef :: parse ( & s ) , used_vars ) ) } else { None } }
Given a Dockerfile (and its global `ARG`s), perform any necessary
variable substitution to resolve any variable references in this
`ImageRef` and returns a list of variables included in the end result.
Given a Dockerfile ( and its global ` ARG ` s ) perform any necessary variable substitution to resolve any variable references in this ` ImageRef ` and returns a list of variables included in the end result .
&self
dockerfile
&'a Dockerfile