Skip to main content

resolve

Function resolve 

Source
pub fn resolve(selector: Option<&str>) -> Result<Option<&'static KnownChain>>
Expand description

Resolve a --chain selector to the chain whose values to bake in.

  • Some("none") => Ok(None): emit the blank generic template.
  • Some(name) => the matching chain, or an error naming the known chains.
  • None (flag omitted) => the sole known chain when exactly one exists; otherwise an error asking the operator to choose.