async fn dep_generations(
    &self,
    entry_id: EntryId,
    run_token: RunToken,
    context: &N::Context,
  ) -> Result<Vec<Generation>, N::Error> {
    let dep_nodes = {
      let inner = self.inner.lock();
      inner
        .pg
        .edges_directed(entry_id, Direction::Outgoing)
        .filter_map(|edge_ref| {
          if edge_ref.weight().1 == run_token {
            let entry = inner
              .entry_for_id(edge_ref.target())
              .unwrap_or_else(|| panic!("Dependency not present in Graph."))
              .clone();
            Some((edge_ref.weight().0, entry.node().clone()))
          } else {
            None
          }
        })
        .collect::<Vec<_>>()
    };
    let generations = dep_nodes
      .into_iter()
      .map(|(edge_type, node)| async move {
        Ok(
          self
            .get_inner(context, node, edge_type)
            .await?
            .map(|(_, generation)| generation),
        )
      })
      .collect::<Vec<_>>();
    // Weak edges might have returned None: we filter those out, and expect that it might cause the
    // Node to fail to be cleaned.
    Ok(
      future::try_join_all(generations)
        .await?
        .into_iter()
        .filter_map(std::convert::identity)
        .collect(),
    )
  }
///
/// Gets the generations of the dependencies of the given EntryId at the given RunToken,
/// (re)computing or cleaning them first if necessary.
///
Gets the generations of the dependencies of the given EntryId at the given RunToken,
(re)computing or cleaning them first if necessary.
Gets the generations of the dependencies of the given EntryId at the given RunToken ( re ) computing or cleaning them first if necessary .
async fn dep_generations(
    &self,
    entry_id: EntryId,
    run_token: RunToken,
    context: &N::Context,
  ) -> Result<Vec<Generation>, N::Error> {
    let dep_nodes = {
      let inner = self.inner.lock();
      inner
        .pg
        .edges_directed(entry_id, Direction::Outgoing)
        .filter_map(|edge_ref| {
          if edge_ref.weight().1 == run_token {
            let entry = inner
              .entry_for_id(edge_ref.target())
              .unwrap_or_else(|| panic!("Dependency not present in Graph."))
              .clone();
            Some((edge_ref.weight().0, entry.node().clone()))
          } else {
            None
          }
        })
        .collect::<Vec<_>>()
    };
    let generations = dep_nodes
      .into_iter()
      .map(|(edge_type, node)| async move {
        Ok(
          self
            .get_inner(context, node, edge_type)
            .await?
            .map(|(_, generation)| generation),
        )
      })
      .collect::<Vec<_>>();
    // Weak edges might have returned None: we filter those out, and expect that it might cause the
    // Node to fail to be cleaned.
    Ok(
      future::try_join_all(generations)
        .await?
        .into_iter()
        .filter_map(std::convert::identity)
        .collect(),
    )
  }
async fn dep_generations ( & self , entry_id : EntryId , run_token : RunToken , context : & N :: Context , ) -> Result < Vec < Generation > , N :: Error > { let dep_nodes = { let inner = self . inner . lock ( ) ; inner . pg . edges_directed ( entry_id , Direction :: Outgoing ) . filter_map ( | edge_ref | { if edge_ref . weight ( ) . 1 == run_token { let entry = inner . entry_for_id ( edge_ref . target ( ) ) . unwrap_or_else ( | | panic ! ( " " ) ) . clone ( ) ; Some ( ( edge_ref . weight ( ) . 0 , entry . node ( ) . clone ( ) ) ) } else { None } } ) . collect :: < Vec < _ > > ( ) } ; let generations = dep_nodes . into_iter ( ) . map ( | ( edge_type , node ) | async move { Ok ( self . get_inner ( context , node , edge_type ) . await ? . map ( | ( _ , generation ) | generation ) , ) } ) . collect :: < Vec < _ > > ( ) ; // Weak edges might have returned None: we filter those out, and expect that it might cause the // Node to fail to be cleaned. Ok ( future :: try_join_all ( generations ) . await ? . into_iter ( ) . filter_map ( std :: convert :: identity ) . collect ( ) , ) }
Gets the generations of the dependencies of the given EntryId at the given RunToken,
(re)computing or cleaning them first if necessary.
Gets the generations of the dependencies of the given EntryId at the given RunToken ( re ) computing or cleaning them first if necessary .
&self
entry_id
EntryId
run_token
RunToken
context
&N::Context
&self
entry_id
EntryId
run_token
RunToken
context
&N::Context