///
/// Nodes optionally have a user-facing name (distinct from their Debug and Display
/// implementations). This user-facing name is intended to provide high-level information
/// to end users of pants about what computation pants is currently doing. Not all
/// `Node`s need a user-facing name. For `Node`s derived from Python `@rule`s, the
/// user-facing name should be the same as the `desc` annotation on the rule decorator.
///
Nodes optionally have a user-facing name (distinct from their Debug and Display
implementations). This user-facing name is intended to provide high-level information
to end users of pants about what computation pants is currently doing. Not all
`Node`s need a user-facing name.
Nodes optionally have a user - facing name ( distinct from their Debug and Display implementations ) . This user - facing name is intended to provide high - level information to end users of pants about what computation pants is currently doing . Not all ` Node ` s need a user - facing name .
fn user_facing_name(&self) -> Option<String> {
    match self {
      NodeKey::Task(ref task) => task.task.display_info.desc.as_ref().map(|s| s.to_owned()),
      NodeKey::Snapshot(ref s) => Some(format!("Snapshotting: {}", s.0)),
      NodeKey::MultiPlatformExecuteProcess(mp_epr) => Some(mp_epr.0.user_facing_name()),
      NodeKey::DigestFile(DigestFile(File { path, .. })) => {
        Some(format!("Fingerprinting: {}", path.display()))
      }
      NodeKey::DownloadedFile(ref d) => Some(format!("Downloading: {}", d.0)),
      NodeKey::ReadLink(ReadLink(Link(path))) => Some(format!("Reading link: {}", path.display())),
      NodeKey::Scandir(Scandir(Dir(path))) => {
        Some(format!("Reading directory: {}", path.display()))
      }
      NodeKey::Select(..) => None,
    }
  }
fn user_facing_name ( & self ) -> Option < String > { match self { NodeKey :: Task ( ref task ) => task . task . display_info . desc . as_ref ( ) . map ( | s | s . to_owned ( ) ) , NodeKey :: Snapshot ( ref s ) => Some ( format ! ( " " s 0 ) ) , NodeKey :: MultiPlatformExecuteProcess ( mp_epr ) => Some ( mp_epr . 0 . user_facing_name ( ) ) , NodeKey :: DigestFile ( DigestFile ( File { path , .. } ) ) => { Some ( format ! ( " " path display ( ) ) ) } NodeKey :: DownloadedFile ( ref d ) => Some ( format ! ( " " d 0 ) ) , NodeKey :: ReadLink ( ReadLink ( Link ( path ) ) ) => Some ( format ! ( " " path display ( ) ) ) , NodeKey :: Scandir ( Scandir ( Dir ( path ) ) ) => { Some ( format ! ( " " path display ( ) ) ) } NodeKey :: Select ( .. ) => None , } }
Nodes optionally have a user-facing name (distinct from their Debug and Display
implementations).
Nodes optionally have a user - facing name ( distinct from their Debug and Display implementations ) .
&self